Makefile 692 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # Copyright (c) 2013 No Face Press, LLC
  3. # License http://opensource.org/licenses/mit-license.php MIT License
  4. #
  5. #This makefile is used to test the other Makefiles
  6. PROG = embedded_cpp
  7. SRC = embedded_cpp.cpp
  8. TOP = ../..
  9. CIVETWEB_LIB = libcivetweb.a
  10. CFLAGS = -I$(TOP)/include $(COPT)
  11. LIBS = -lpthread
  12. include $(TOP)/resources/Makefile.in-os
  13. ifeq ($(TARGET_OS),LINUX)
  14. LIBS += -ldl -lrt
  15. endif
  16. ifdef WITH_ZLIB
  17. LIBS += -lz
  18. endif
  19. all: $(PROG)
  20. $(PROG): $(CIVETWEB_LIB) $(SRC)
  21. $(CXX) -o $@ $(CFLAGS) $(LDFLAGS) $(SRC) $(CIVETWEB_LIB) $(LIBS)
  22. $(CIVETWEB_LIB):
  23. $(MAKE) -C $(TOP) clean lib WITH_CPP=1
  24. cp $(TOP)/$(CIVETWEB_LIB) .
  25. clean:
  26. rm -f $(CIVETWEB_LIB) $(PROG)
  27. .PHONY: all clean