]> git.stg.codes - stg.git/blobdiff - projects/stargazer/Makefile
Fixes due to stupid behaviour of BSD-like install.
[stg.git] / projects / stargazer / Makefile
index 9dfc0b51e0cec512172e6a71aef8ce1a46b3d463..0fbccd32ec74fb29eb64bc5e1367a18a92595944 100644 (file)
@@ -13,6 +13,7 @@ SRCS = ./admin_impl.cpp \
        ./main.cpp \
        ./pidfile.cpp \
        ./plugin_runner.cpp \
+       ./plugin_mgr.cpp \
        ./settings_impl.cpp \
        ./services_impl.cpp \
        ./stg_timer.cpp \
@@ -26,7 +27,6 @@ SRCS = ./admin_impl.cpp \
 
 STGLIBS = scriptexecuter \
           dotconfpp \
-         locker \
          logger \
          common
 
@@ -47,7 +47,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 install-bin install-data
 all: libs plugins $(PROG)
@@ -78,9 +83,11 @@ install: install-bin install-data
 
 install-bin: $(PROG)
 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_INCLUDE) install
        $(MAKE) -C $(DIR_LIBSRC) install