X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/517400b7934a39872ffa02370ac7aa1264bec114..04af0b0b4df91a7a1f579edf17f49a81d10db592:/projects/sgconv/Makefile?ds=inline diff --git a/projects/sgconv/Makefile b/projects/sgconv/Makefile index 794114c7..b463f175 100644 --- a/projects/sgconv/Makefile +++ b/projects/sgconv/Makefile @@ -10,20 +10,20 @@ SRCS = ./main.cpp \ ./settings_impl.cpp STGLIBS = dotconfpp \ - conffiles \ - logger \ - crypto \ + conffiles \ + logger \ + crypto \ 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 += -lc -liconv +LIBS += -lc endif SEARCH_DIRS = -I ../../include @@ -32,7 +32,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 plugins install uninstall all: libs plugins $(PROG) ../../Makefile.conf @@ -40,7 +45,7 @@ all: libs plugins $(PROG) ../../Makefile.conf libs: $(MAKE) -C $(DIR_LIBSRC) -plugins: libs +plugins: libs $(MAKE) -C $(DIR_PLUGINS) $(PROG): $(OBJS) @@ -62,9 +67,11 @@ install: install-bin install-bin: ifeq ($(DEBUG), yes) - install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG) else - install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/bin + install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG) endif $(MAKE) -C $(DIR_PLUGINS) install