libgourou/utils/Makefile

58 lines
1.3 KiB
Makefile
Raw Normal View History

2021-07-03 21:57:53 +02:00
2022-04-03 09:36:23 +02:00
TARGETS=acsmdownloader adept_activate adept_remove adept_loan_mgt
2021-07-03 21:57:53 +02:00
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
2021-09-28 18:14:41 +02:00
LDFLAGS=
ifneq ($(OPENSSL3),)
2022-06-05 15:29:20 +02:00
# OpenSSL 1.1.0 compat
CXXFLAGS += -DOPENSSL_API_COMPAT=0x10100000L
CXXFLAGS += -I/tmp/openssl3/usr/include/ -I/tmp/openssl3/usr/include/x86_64-linux-gnu
LDFLAGS += -L/tmp/openssl3/usr/lib/x86_64-linux-gnu -L/tmp/openssl3/usr/lib/x86_64-linux-gnu/ossl-modules
endif
2022-06-05 15:29:20 +02:00
STATIC_DEP=
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl
2021-07-05 20:23:25 +02:00
ifneq ($(STATIC_UTILS),)
STATIC_DEP = $(ROOT)/libgourou.a
2021-07-05 20:23:25 +02:00
else
LDFLAGS += -lgourou
2021-07-05 20:23:25 +02:00
endif
2021-07-03 21:57:53 +02:00
ifneq ($(DEBUG),)
CXXFLAGS += -ggdb -O0
else
CXXFLAGS += -O2
endif
2022-04-03 09:36:23 +02:00
COMMON_DEPS = drmprocessorclientimpl.cpp utils_common.cpp
COMMON_OBJECTS = $(COMMON_DEPS:.cpp=.o)
COMMON_LIB = utils.a
2021-12-18 17:42:23 +01:00
2021-07-03 21:57:53 +02:00
all: $(TARGETS)
2022-04-03 09:36:23 +02:00
${COMMON_LIB}: ${COMMON_DEPS} ${STATIC_DEP}
$(CXX) $(CXXFLAGS) ${COMMON_DEPS} $(LDFLAGS) -c
$(AR) crs $@ ${COMMON_OBJECTS} $(STATIC_DEP)
acsmdownloader: acsmdownloader.cpp ${COMMON_LIB}
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
adept_activate: adept_activate.cpp ${COMMON_LIB}
2021-12-18 17:42:23 +01:00
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
2022-04-03 09:36:23 +02:00
adept_remove: adept_remove.cpp ${COMMON_LIB}
2021-07-03 21:57:53 +02:00
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
2022-04-03 09:36:23 +02:00
adept_loan_mgt: adept_loan_mgt.cpp ${COMMON_LIB}
2021-07-03 21:57:53 +02:00
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
clean:
rm -f $(TARGETS)
ultraclean: clean