1 ###############################################################################
2 # $Id: Makefile,v 1.18 2010/02/11 12:22:01 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
13 STGLIBS = scriptexecuter \
20 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
21 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
23 LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD)
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/rscriptd
66 install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf
68 uninstall: uninstall-bin uninstall-data
71 rm -f $(PREFIX)/usr/sbin/$(PROG)
75 rm -f $(PREFIX)/etc/rscriptd/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 printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\