Update Makefile to be more GNU/Linux style

This commit is contained in:
2023-01-08 21:05:04 +01:00
parent 3a0ab4b438
commit 8aec5be244
2 changed files with 41 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
TARGETS=acsmdownloader adept_activate adept_remove adept_loan_mgt launcher
TARGET_BINARIES=acsmdownloader adept_activate adept_remove adept_loan_mgt
TARGETS=$(TARGET_BINARIES) launcher
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
@@ -32,6 +33,15 @@ ${COMMON_LIB}: ${COMMON_DEPS} ${STATIC_DEP}
%: %.cpp ${COMMON_LIB}
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o $@
install:
install -d $(DESTDIR)$(PREFIX)/bin/
install -m 644 $(TARGET_BINARIES) $(DESTDIR)$(PREFIX)/bin/
uninstall:
cd $(DESTDIR)$(PREFIX)/bin/
rm -f $(TARGET_BINARIES)
cd -
clean:
rm -f $(TARGETS) $(COMMON_LIB)