1 ###############################################################################
2 # $Id: Makefile,v 1.18 2010/02/11 12:22:01 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
24 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
25 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
27 LIBS += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS))
29 SEARCH_DIRS = -I ../../include
31 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
33 CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
34 CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
35 LDFLAGS += -Wl,-E $(STGLIBS_LIBS)
37 .PHONY: all clean distclean libs install uninstall
38 all: libs $(PROG) ../../Makefile.conf
41 $(MAKE) -C $(DIR_LIBSRC)
44 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
47 rm -f deps $(PROG) *.o tags *.*~ .OS
52 $(MAKE) -C $(DIR_LIBSRC) clean
55 rm -f ../../Makefile.conf
57 install: install-bin install-data
60 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
61 $(MAKE) -C $(DIR_LIBSRC) install
65 mkdir -m $(DIR_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)
89 for file in $(SRCS); do\
90 echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
91 echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\