Makefile 673 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #
  2. # Copyright (c) 2014 Jordan Shelley
  3. # https://github.com/jshelley
  4. # License http://opensource.org/licenses/mit-license.php MIT License
  5. #
  6. #This makefile is used to test the other Makefiles
  7. PROG = websocket_client
  8. SRC = websocket_client.c
  9. TOP = ../..
  10. CIVETWEB_LIB = libcivetweb.a
  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)
  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. clean:
  24. rm -f $(CIVETWEB_LIB) $(PROG)
  25. .PHONY: all clean