X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1adb53e896797c73b5528ee178bd73ff51be2c43..02c7f0f453d4237a6cf6bec885863a32addb6d75:/projects/rlm_stg/Makefile?ds=sidebyside diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index faa8aa30..05c43d95 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -13,19 +13,18 @@ SRCS = ./rlm_stg.c \ ./stg_client.cpp STGLIBS = crypto \ - common - + common + STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) $(LIBICONV) ifeq ($(OS),linux) LIBS += -ldl else LIBS += -lintl \ - -lc \ - -liconv + -lc endif SEARCH_DIRS = -I ../../include @@ -58,16 +57,34 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) +ifeq ($(OS), linux) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) +else + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) +endif +else + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) +ifeq ($(OS), linux) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) else - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG) +endif endif $(MAKE) -C $(DIR_LIBSRC) install uninstall: uninstall-bin uninstall-bin: +ifeq ($(OS), linux) + rm -f $(PREFIX)/usr/lib/freeradius/$(PROG) +else rm -f $(PREFIX)/usr/lib/$(PROG) +endif ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),clean)