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 += $(LIB_THREAD) $(addprefix -lstg,$(STGLIBS))
28 SEARCH_DIRS = -I ../../include
30 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
32 CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
33 CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
34 LDFLAGS += -Wl,-E $(STGLIBS_LIBS)
36 .PHONY: all clean distclean libs plugins
37 all: libs plugins $(PROG) ../../Makefile.conf
40 $(MAKE) -C $(DIR_LIBSRC)
43 $(MAKE) -C $(DIR_PLUGINS)
46 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
49 rm -f deps $(PROG) *.o *.*~
50 $(MAKE) -C $(DIR_LIBSRC) clean
51 $(MAKE) -C $(DIR_PLUGINS) clean
54 rm -f ../../Makefile.conf
56 ifneq ($(MAKECMDGOALS),distclean)
57 ifneq ($(MAKECMDGOALS),clean)
58 ifneq ($(MAKECMDGOALS),uninstall)
64 deps: $(SRCS) ../../Makefile.conf
65 $(MAKE) -C $(DIR_LIBSRC)
67 for file in $(SRCS); do\
68 echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
69 echo -e '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\