./settings_impl.cpp
STGLIBS = dotconfpp \
- conffiles \
- logger \
- crypto \
+ conffiles \
+ logger \
+ crypto \
common
STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
ifeq ($(OS),linux)
LIBS += -ldl
+D_FLAG = -D
else
LIBS += -lc -liconv
+D_FLAG = -d
endif
SEARCH_DIRS = -I ../../include
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
libs:
$(MAKE) -C $(DIR_LIBSRC)
-plugins: libs
+plugins: libs
$(MAKE) -C $(DIR_PLUGINS)
$(PROG): $(OBJS)
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_PLUGINS) install