1234567891011121314151617181920212223242526272829303132333435363738394041 |
- TARGET = proxy2ch
- SOURCES = main.cpp BBS2chProxyConnection.cpp BBS2chProxyAuth.cpp DataStorage.cpp hmac.c
- OBJS = $(SOURCES:.cpp=.o)
- OBJS := $(OBJS:.c=.o)
- CFLAGS = -O2
- LDFLAGS = -lcurl -lpthread
- UNAME := $(shell uname)
- HAVE_GNUTLS := $(shell pkg-config --libs gnutls 2>&1 >/dev/null; echo $$?)
- ifneq ($(UNAME), Darwin)
- ifeq ($(HAVE_GNUTLS), 0)
- CFLAGS += -DUSE_GNUTLS
- LDFLAGS += -lgnutls
- else
- LDFLAGS += -lcrypto
- endif
- endif
- .PHONY: all
- all : $(TARGET)
- $(TARGET) : $(OBJS)
- $(CXX) $^ -o $(TARGET) $(LDFLAGS)
- .cpp.o:
- $(CXX) $(CFLAGS) -c $<
- .c.o:
- $(CC) $(CFLAGS) -c $<
- .PHONY: depend
- depend:
- $(CXX) -MM $(CFLAGS) $(SOURCES) > dependencies
- .PHONY: clean
- clean :
- rm -f $(OBJS) $(TARGET)
- include dependencies
|