PageRenderTime 11ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Examples/php4/shadow/Makefile

#
Makefile | 37 lines | 24 code | 13 blank | 0 comment | 0 complexity | 4980c6414632e84dd07e866f5571d668 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1
 2SWIGFLAGS   = -c++
 3
 4C_SOURCES   = 
 5CXX_SOURCES = example.cxx
 6
 7SWIG = ../../../preinst-swig
 8
 9all: check
10
11example_wrap.cpp: 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