1 ###############################################################################
2 # $Id: Makefile,v 1.18 2010/02/11 12:22:01 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
13 STGLIBS = -lstglogger \
21 SEARCH_DIRS = -I $(DIR_INCLUDE)
23 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
26 LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg -Wl,-rpath-link,$(DIR_LIB)
30 .PHONY: all clean distclean libs install uninstall
31 all: libs $(PROG) ../../Makefile.conf
34 $(MAKE) -C $(DIR_LIBSRC)
36 $(PROG): $(OBJS) $(STGLIBS)
37 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
40 rm -f deps $(PROG) *.o tags *.*~ .OS
45 $(MAKE) -C $(DIR_LIBSRC) clean
48 rm -f ../../Makefile.conf
50 install: install-bin install-data
53 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
54 $(MAKE) -C $(DIR_LIBSRC) install
58 mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer
59 install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf
61 uninstall: uninstall-bin uninstall-data
64 rm -f $(PREFIX)/usr/sbin/$(PROG)
68 rm -f $(PREFIX)/etc/stragazer/rscriptd.conf
71 ifneq ($(MAKECMDGOALS),distclean)
72 ifneq ($(MAKECMDGOALS),clean)
73 ifneq ($(MAKECMDGOALS),uninstall)
79 deps: $(SRCS) ../../Makefile.conf
80 $(MAKE) -C $(DIR_LIBSRC) includes
82 for file in $(SRCS); do\
83 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
84 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\