1 ###############################################################################
2 # $Id: Makefile,v 1.12 2009/03/03 15:49:34 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
12 STGLIBS = -lstg_logger \
25 SEARCH_DIRS = -I $(DIR_INCLUDE)
27 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
30 LDFLAGS += -Wl,-E -L$(DIR_LIB) -Wl,-rpath,$(DIR_LIB)
34 .PHONY: all clean distclean libs plugins install uninstall
35 all: libs plugins $(PROG) ../../Makefile.conf
38 $(MAKE) -C $(DIR_LIBSRC)
41 $(MAKE) -C $(DIR_PLUGINS)
43 $(PROG): $(OBJS) $(STGLIBS)
44 $(CC) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
47 rm -f deps $(PROG) *.o tags *.*~ .OS
52 $(MAKE) -C $(DIR_LIBSRC) clean
53 $(MAKE) -C $(DIR_PLUGINS) clean
56 rm -f ../../Makefile.conf
58 ifneq ($(MAKECMDGOALS),distclean)
59 ifneq ($(MAKECMDGOALS),clean)
60 ifneq ($(MAKECMDGOALS),uninstall)
66 deps: $(SRCS) ../../Makefile.conf
67 $(MAKE) -C $(DIR_LIBSRC) includes
69 for file in $(SRCS); do\
70 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
71 echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\