]> git.stg.codes - stg.git/blobdiff - projects/sgauth/Makefile
eq/neq fixes.
[stg.git] / projects / sgauth / Makefile
index 88e1fb9c792403e98291330f1a570dc84e9e7b53..c1a3c9e9fad8abdee861c50f7ca69bcc96a65e3b 100644 (file)
@@ -20,10 +20,13 @@ STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
 
 LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD)
 
-ifneq ($(OS),linux)
+ifeq ($(OS),linux)
+D_FLAG = -D
+else
 LIBS += -lintl \
         -lc \
-       -liconv
+        -liconv
+D_FLAG = -d
 endif
 
 SEARCH_DIRS = -I ../../include
@@ -32,7 +35,7 @@ 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)
 
 .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data
 all: libs $(PROG) ../../Makefile.conf
@@ -58,7 +61,11 @@ distclean: clean
 install: install-bin install-data
 
 install-bin:
-       install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+       install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+else
+       install $(D_FLAG) -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+endif
        $(MAKE) -C $(DIR_LIBSRC) install
 
 install-data:
@@ -87,7 +94,7 @@ endif
 deps:  $(SRCS) ../../Makefile.conf sgauth.css
        $(MAKE) -C $(DIR_LIBSRC)
        @>deps ;\
-       ./make_css.sh
+       ./make_css.sh ;\
        for file in $(SRCS); do\
          echo "$$file" | grep ".c$$" > /dev/null;\
          if [ $$? -eq 0 ];\