1 include ../../Makefile.conf
16 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
17 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
19 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 plugins
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 *.*~
51 $(MAKE) -C $(DIR_LIBSRC) clean
52 $(MAKE) -C $(DIR_PLUGINS) clean
55 rm -f ../../Makefile.conf
57 ifneq ($(MAKECMDGOALS),distclean)
58 ifneq ($(MAKECMDGOALS),clean)
59 ifneq ($(MAKECMDGOALS),uninstall)
65 deps: $(SRCS) ../../Makefile.conf
66 $(MAKE) -C $(DIR_LIBSRC)
68 for file in $(SRCS); do\
69 echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
70 echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\