X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c3d4d096451b5c683492e81574b302e5486950e1..66c4165457f76e06ce6716a42dd4c8495af916db:/projects/rscriptd/Makefile?ds=sidebyside diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index adbc4eb3..98b2f5e4 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -19,11 +19,7 @@ STGLIBS = scriptexecuter \ STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) - -ifneq ($(OS),linux) -LIBS += -liconv -endif +LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD) $(LIBICONV) SEARCH_DIRS = -I ../../include @@ -31,7 +27,12 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) -LDFLAGS += -Wl,-E $(STGLIBS_LIBS) + +ifneq ($(OS),darwin) +LDFLAGS += -Wl,-E +endif + +LDFLAGS += $(STGLIBS_LIBS) .PHONY: all clean distclean libs install uninstall all: libs $(PROG) ../../Makefile.conf @@ -57,9 +58,11 @@ install: install-bin install-data install-bin: ifeq ($(DEBUG), yes) - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) else - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install @@ -68,11 +71,13 @@ install-data: mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf ifeq ($(OS), linux) - install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ - install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ else - install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ - install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/ + install -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/ endif uninstall: uninstall-bin uninstall-data