1 ###############################################################################
2 # $Id: Makefile,v 1.12 2009/03/03 15:49:34 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
18 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
19 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
21 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 plugins install uninstall
38 all: libs plugins $(PROG) ../../Makefile.conf
41 $(MAKE) -C $(DIR_LIBSRC)
44 $(MAKE) -C $(DIR_PLUGINS)
47 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
50 rm -f deps $(PROG) *.o tags *.*~ .OS
55 $(MAKE) -C $(DIR_LIBSRC) clean
56 $(MAKE) -C $(DIR_PLUGINS) clean
59 rm -f ../../Makefile.conf
61 ifneq ($(MAKECMDGOALS),distclean)
62 ifneq ($(MAKECMDGOALS),clean)
63 ifneq ($(MAKECMDGOALS),uninstall)
69 deps: $(SRCS) ../../Makefile.conf
70 $(MAKE) -C $(DIR_LIBSRC)
72 for file in $(SRCS); do\
73 echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
74 echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\