X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73ff333eec2793138265afd36f716a23e0f8bff6..2efac265830ab1b6cd1e3e0d4b04076174dd3b16:/projects/rlm_stg/Makefile?ds=sidebyside diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index 3a4f5d7a..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 @@ -59,16 +58,21 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) ifeq ($(OS), linux) - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/freeradius + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) else - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG) endif else - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + 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) - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG) + 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 @@ -76,7 +80,11 @@ endif 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)