1 ###############################################################################
2 # $Id: Makefile,v 1.18 2010/02/11 12:22:01 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
13 STGLIBS = -lstg_logger \
27 SEARCH_DIRS = -I $(DIR_INCLUDE)
29 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
32 LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB)
36 .PHONY: all clean distclean libs install uninstall
37 all: libs $(PROG) ../../Makefile.conf
40 $(MAKE) -C $(DIR_LIBSRC)
42 $(PROG): $(OBJS) $(STGLIBS)
43 $(CC) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
46 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/stargazer
66 install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf
68 uninstall: uninstall-bin uninstall-data
71 rm -f $(PREFIX)/usr/sbin/$(PROG)
75 rm -f $(PREFIX)/etc/stragazer/rscriptd.conf
78 ifneq ($(MAKECMDGOALS),distclean)
79 ifneq ($(MAKECMDGOALS),clean)
80 ifneq ($(MAKECMDGOALS),uninstall)
86 deps: $(SRCS) ../../Makefile.conf
87 $(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 ;\