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 "$$file" | grep ".c$$" > /dev/null;\
72 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\
73 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
75 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
76 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\