PageRenderTime 8ms CodeModel.GetById 6ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Examples/php4/variables/Makefile

#
Makefile | 37 lines | 24 code | 13 blank | 0 comment | 0 complexity | c8a414278382dc308a967c2ef3618744 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1
 2SWIGFLAGS   =
 3
 4C_SOURCES   = example.c
 5CXX_SOURCES =
 6
 7SWIG = ../../../swig
 8
 9all: check
10
11example_wrap.c: example.i
12	$(SWIG) -php4 $(SWIGFLAGS) example.i
13
14OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)
15
16PROG=php_example.so
17
18PHP_INC=`php-config --includes`
19
20CFLAGS  = -fpic
21LDFLAGS = -shared
22
23$(PROG): $(OBJS)
24	$(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB)
25
26%.o: %.cpp
27	$(CXX) $(PHP_INC) $(CFLAGS) -c $<
28%.o: %.cxx
29	$(CXX) $(PHP_INC) $(CFLAGS) -c $<
30%.o: %.c
31	$(CC) $(PHP_INC) $(CFLAGS) -c $<
32
33check: $(PROG)
34	@php -d extension_dir=. runme.php4
35
36clean:
37	rm -f example_wrap.* *.o *~ *.so core example.php php_example.h