1 ###############################################################################
2 # $Id: Makefile,v 1.18 2010/02/11 12:22:01 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
13 STGLIBS = -lstglogger \
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 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/stargazer
65 install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf
67 uninstall: uninstall-bin uninstall-data
70 rm -f $(PREFIX)/usr/sbin/$(PROG)
74 rm -f $(PREFIX)/etc/stragazer/rscriptd.conf
77 ifneq ($(MAKECMDGOALS),distclean)
78 ifneq ($(MAKECMDGOALS),clean)
79 ifneq ($(MAKECMDGOALS),uninstall)
85 deps: $(SRCS) ../../Makefile.conf
86 $(MAKE) -C $(DIR_LIBSRC) includes
88 for file in $(SRCS); do\
89 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
90 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\