Code

fix for #301: plug memory leak in lua bindings -- bmayland @ leoninedev.com
[rrdtool-all.git] / contrib / php3 / Makefile
1 # code by Joey Miller <joeym@inficad.com>
2 #
3 #
4 # BEFORE COMPILING YOU MUST SET THE VARIABLES BELOW
5 # TO INDICATE THE CORRECT DIRECTORIES!!!!!!!!!!!!!!!!!!!!!
6 #
7 #
8 # USE AT YOUR OWN RISK!
9 #
11 ## begin configurable vars
13 ## PHPINCLUDE -- the directory where php is untarred
14 ##
15 PHPINCLUDE =  -I/usr/home/joeym/apache_build/php-3.0.14
17 ## PHPLIBS -- the directory where you can find some of the PHP objects
18 ## and compiled libs (the directory where php is untarred, and
19 ## has already been compiled!
20 ##
21 PHPLIBS    =  /usr/home/joeym/apache_build/php-3.0.14
23 ## RRDINCLUDE, GDINCLUDE -- where to find some of the header
24 ## files needed by rrdtool and it's libs
25 ##
26 RRDINCLUDE =  -I/usr/home/joeym/newshit/rrdtool-1.0.10/src
27 GDINCLUDE  =  -I/usr/home/joeym/newshit/rrdtool-1.0.10/gd1.3
29 ## RRDLIB -- where to find librrd.a (usually /usr/local/rrdtool-1.0.10/lib)
30 RRDLIB     =    /usr/local/rrdtool-1.0.10/lib
32 #
33 # if php is compiled as an apache module
34 #
35 APACHEINC = -I/var/www/include
39 ###### end primary config vars  .. change the vars below only
40 ###### if you need to
41 ######
46 CFLAGS  = -O -fpic
47 CC      = gcc
49 CXX     = g++
50 CXXFLAGS= $(CFLAGS)
52 LD      = cc
53 LDFLAGS = -shared
55 RM      = /bin/rm
57 OBJS    =  php3_rrdtool.o
58 CFLAGS  := $(CFLAGS) -I../lib $(PHPINCLUDE) $(APACHEINC) $(RRDINCLUDE) $(GDINCLUDE)
59 CXXFLAGS:= $(CXXFLAGS) -I../lib $(PHPINCLUDE) $(APACHEINC) $(RRDINCLUDE) $(GDINCLUDE)
60 LIBS    := -L$(RRDLIB) -L$(PHPLIBS) -lrrd 
62 all: php3_rrdtool.so
64 php3_rrdtool.so: $(OBJS)
65         $(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
67 clean:
68         $(RM) *.o
69         $(RM) *.so
70         
71 veryclean: clean
72         $(RM) *~