X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1adb53e896797c73b5528ee178bd73ff51be2c43..7e0f07b593a81c4f1bf0101cdc66968ae40462fb:/projects/sgconf/Makefile?ds=inline diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index 297d3e20..be513439 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -11,7 +11,7 @@ SRCS = ./main.cpp \ STGLIBS = conffiles \ srvconf \ - crypto \ + crypto \ common STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS))) @@ -22,7 +22,10 @@ LIBS += $(addprefix -lstg,$(STGLIBS)) -lexpat $(LIB_THREAD) ifeq ($(OS),linux) else LIBS += -lc \ - -liconv + -liconv +D_FLAG = -D +else +D_FLAG = -d endif SEARCH_DIRS = -I ../../include @@ -41,7 +44,11 @@ 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) +LDFLAGS += $(STGLIBS_LIBS) + +ifneq ($(OS),darwin) +LDFLAGS += -Wl,-E +endif .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf @@ -67,9 +74,9 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) else - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) + install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) endif $(MAKE) -C $(DIR_LIBSRC) install