/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

  1. SWIGFLAGS = -c++
  2. C_SOURCES =
  3. CXX_SOURCES = example.cxx
  4. SWIG = ../../../preinst-swig
  5. all: check
  6. example_wrap.cpp: example.i
  7. $(SWIG) -php4 $(SWIGFLAGS) example.i
  8. OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)
  9. PROG=php_example.so
  10. PHP_INC=`php-config --includes`
  11. CFLAGS = -fpic
  12. LDFLAGS = -shared
  13. $(PROG): $(OBJS)
  14. $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB)
  15. %.o: %.cpp
  16. $(CXX) $(PHP_INC) $(CFLAGS) -c $<
  17. %.o: %.cxx
  18. $(CXX) $(PHP_INC) $(CFLAGS) -c $<
  19. %.o: %.c
  20. $(CC) $(PHP_INC) $(CFLAGS) -c $<
  21. check: $(PROG)
  22. @php -d extension_dir=. runme.php4
  23. clean:
  24. rm -f example_wrap.* *.o *~ *.so core example.php php_example.h