Makefile 719 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 = chat
  7. SRC = chat.c
  8. TOP = ../..
  9. CIVETWEB_LIB = libcivetweb.a
  10. SSL_CERT = ssl_cert.pem
  11. CFLAGS = -I$(TOP)/include $(COPT)
  12. LIBS = -lpthread
  13. include $(TOP)/resources/Makefile.in-os
  14. ifeq ($(TARGET_OS),LINUX)
  15. LIBS += -ldl
  16. endif
  17. all: $(PROG) $(SSL_CERT)
  18. $(PROG): $(CIVETWEB_LIB) $(SRC)
  19. $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(SRC) $(CIVETWEB_LIB) $(LIBS)
  20. $(CIVETWEB_LIB):
  21. $(MAKE) -C $(TOP) clean lib
  22. cp $(TOP)/$(CIVETWEB_LIB) .
  23. $(SSL_CERT):
  24. cp $(TOP)/resources/$(SSL_CERT) .
  25. clean:
  26. rm -f $(CIVETWEB_LIB) $(PROG) $(SSL_CERT)
  27. .PHONY: all clean