1 ###############################################################################
2 # $Id: Makefile,v 1.18 2009/08/06 12:50:55 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
12 STGLIBS = -lconffiles \
18 LIBS += $(LIB_THREAD) \
28 SEARCH_DIRS = -I $(DIR_INCLUDE)
30 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
33 LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB)
37 .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data
38 all: libs $(PROG) ../../Makefile.conf
41 $(MAKE) -C $(DIR_LIBSRC)
43 $(PROG): $(OBJS) $(STGLIBS)
44 $(CC) $^ $(LDFLAGS) -o $(PROG) $(LIBS)
47 rm -f deps $(PROG) *.o tags *.*~ .OS
53 $(MAKE) -C $(DIR_LIBSRC) clean
56 rm -f ../../Makefile.conf
58 install: install-bin install-data
61 mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin
62 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
63 $(MAKE) -C $(DIR_LIBSRC) install
67 mkdir -m $(DATA_MODE) -p $(PREFIX)/etc
68 install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf
70 uninstall: uninstall-bin uninstall-data
73 rm -f $(PREFIX)/usr/sbin/$(PROG)
77 rm -f $(PREFIX)/etc/stargazer/sgauth.conf
80 ifneq ($(MAKECMDGOALS),distclean)
81 ifneq ($(MAKECMDGOALS),clean)
82 ifneq ($(MAKECMDGOALS),uninstall)
88 deps: $(SRCS) ../../Makefile.conf sgauth.css
89 $(MAKE) -C $(DIR_LIBSRC) includes
92 for file in $(SRCS); do\
93 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
94 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\