1 ###############################################################################
2 # $Id: Makefile,v 1.18 2009/08/06 12:50:55 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
13 STGLIBS = -lstgconffiles \
26 SEARCH_DIRS = -I $(DIR_INCLUDE)
28 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
31 LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB)
35 .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data
36 all: libs $(PROG) ../../Makefile.conf
39 $(MAKE) -C $(DIR_LIBSRC)
41 $(PROG): $(OBJS) $(STGLIBS)
42 $(CC) $^ $(LDFLAGS) -o $(PROG) $(LIBS)
45 rm -f deps $(PROG) *.o tags *.*~ .OS
51 $(MAKE) -C $(DIR_LIBSRC) clean
54 rm -f ../../Makefile.conf
56 install: install-bin install-data
59 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
60 $(MAKE) -C $(DIR_LIBSRC) install
64 mkdir -m $(DIR_MODE) -p $(PREFIX)/etc
65 install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf
67 uninstall: uninstall-bin uninstall-data
70 rm -f $(PREFIX)/usr/sbin/$(PROG)
74 rm -f $(PREFIX)/etc/sgauth.conf
77 ifneq ($(MAKECMDGOALS),distclean)
78 ifneq ($(MAKECMDGOALS),clean)
79 ifneq ($(MAKECMDGOALS),uninstall)
85 deps: $(SRCS) ../../Makefile.conf sgauth.css
86 $(MAKE) -C $(DIR_LIBSRC) includes
89 for file in $(SRCS); do\
90 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
91 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\