Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. BOOST = ../../..
  2. CXX = g++
  3. EXTRAFLAGS = -pedantic -Wno-long-long -Wno-long-double -ftemplate-depth-50
  4. LIBS = -lstdc++
  5. #CXX = KCC
  6. #EXTRAFLAGS = --strict --display_error_number --diag_suppress 450 --max_pending_instantiations 50
  7. #LIBS =
  8. INCLUDES = -I$(BOOST)
  9. CXXFLAGS = $(INCLUDES) $(EXTRAFLAGS)
  10. LIBFLAGS = $(LIBS)
  11. AR = ar
  12. .SUFFIXES: .cpp .o
  13. SOURCES = \
  14. is_instance_of_test.cpp \
  15. operator_tests_simple.cpp \
  16. member_pointer_test.cpp \
  17. control_structures.cpp \
  18. switch_construct.cpp \
  19. bind_tests_simple.cpp \
  20. bind_tests_advanced.cpp \
  21. bll_and_function.cpp \
  22. constructor_tests.cpp \
  23. extending_rt_traits.cpp \
  24. bind_tests_simple_f_refs.cpp \
  25. cast_test.cpp \
  26. phoenix_control_structures.cpp \
  27. exception_test.cpp \
  28. # Create lists of object files from the source file lists.
  29. OBJECTS = ${SOURCES:.cpp=.o}
  30. TARGETS = ${SOURCES:.cpp=.exe}
  31. all: $(TARGETS)
  32. %.exe: %.o
  33. $(CXX) $(LIBFLAGS) $(CXXFLAGS) -o $@ $<
  34. %.o: %.cpp
  35. $(CXX) $(CXXFLAGS) -o $@ -c $<
  36. %.dep: %.cpp
  37. set -e; $(CXX) -M $(INCLUDES) -c $< \
  38. | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
  39. [ -s $@ ] || rm -f $@
  40. DEP_FILES = $(SOURCES:.cpp=.dep)
  41. include $(DEP_FILES)
  42. clean:
  43. /bin/rm -rf $(TARGETS) $(OBJECTS) $(DEP_FILES)
  44. run:
  45. ./is_instance_of_test.exe
  46. ./member_pointer_test.exe
  47. ./operator_tests_simple.exe
  48. ./control_structures.exe
  49. ./switch_construct.exe
  50. ./extending_rt_traits.exe
  51. ./constructor_tests.exe
  52. ./cast_test.exe
  53. ./bind_tests_simple.exe
  54. ./bind_tests_advanced.exe
  55. ./bll_and_function.exe
  56. ./bind_tests_simple_f_refs.exe
  57. ./phoenix_control_structures.exe
  58. ./exception_test.exe