Makefile 673 B

12345678910111213141516171819202122232425262728293031323334353637
  1. TARGET = proxy2ch
  2. SOURCES = main.cpp BBS2chProxyConnection.cpp BBS2chProxyAuth.cpp DataStorage.cpp
  3. OBJS = $(SOURCES:.cpp=.o)
  4. CXXFLAGS = -O2
  5. LDFLAGS = -lcurl -lpthread
  6. UNAME := $(shell uname)
  7. HAVE_GNUTLS := $(shell pkg-config --libs gnutls 2>&1 >/dev/null; echo $$?)
  8. ifneq ($(UNAME), Darwin)
  9. ifeq ($(HAVE_GNUTLS), 0)
  10. CXXFLAGS += -DUSE_GNUTLS
  11. LDFLAGS += -lgnutls
  12. else
  13. LDFLAGS += -lcrypto
  14. endif
  15. endif
  16. .PHONY: all
  17. all : $(TARGET)
  18. $(TARGET) : $(OBJS)
  19. $(CXX) $^ -o $(TARGET) $(LDFLAGS)
  20. .cpp.o:
  21. $(CXX) $(CXXFLAGS) -c $<
  22. .PHONY: depend
  23. depend:
  24. $(CXX) -MM $(CXXFLAGS) $(SOURCES) > dependencies
  25. .PHONY: clean
  26. clean :
  27. rm -f $(OBJS) $(TARGET)
  28. include dependencies