1 ###############################################################################
2 # $Id: Makefile,v 1.18 2009/08/06 12:50:55 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
12 STGLIBS = -lconffiles \
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 mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin
60 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
61 $(MAKE) -C $(DIR_LIBSRC) install
65 mkdir -m $(DATA_MODE) -p $(PREFIX)/etc
66 install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf
68 uninstall: uninstall-bin uninstall-data
71 rm -f $(PREFIX)/usr/sbin/$(PROG)
75 rm -f $(PREFIX)/etc/stargazer/sgauth.conf
78 ifneq ($(MAKECMDGOALS),distclean)
79 ifneq ($(MAKECMDGOALS),clean)
80 ifneq ($(MAKECMDGOALS),uninstall)
86 deps: $(SRCS) ../../Makefile.conf sgauth.css
87 $(MAKE) -C $(DIR_LIBSRC) includes
90 for file in $(SRCS); do\
91 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
92 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\