X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7e0f07b593a81c4f1bf0101cdc66968ae40462fb..refs/heads/stg-2.409-radius:/projects/sgconf_xml/Makefile diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index ab53b752..e3eaa05d 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -17,15 +17,11 @@ STGLIBS = conffiles \ STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS))) -LIBS += $(addprefix -lstg,$(STGLIBS)) -lexpat $(LIB_THREAD) +LIBS += $(addprefix -lstg,$(STGLIBS)) -lexpat $(LIB_THREAD) $(LIBICONV) ifeq ($(OS),linux) else -LIBS += -lc \ - -liconv -D_FLAG = -D -else -D_FLAG = -d +LIBS += -lc endif SEARCH_DIRS = -I ../../include @@ -44,7 +40,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 install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf @@ -70,9 +71,11 @@ install: install-bin install-data install-bin: ifeq ($(DEBUG), yes) - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/sbin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG) else - install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(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