1 include ../../Makefile.conf
15 STGLIBS_INCS = $(addprefix -I ../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
16 STGLIBS_LIBS = $(addprefix -L ../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
18 LIBS += $(addprefix -lstg,$(STGLIBS)) $(LIB_THREAD)
30 SEARCH_DIRS = -I ../../include
32 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
34 CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
35 CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
36 LDFLAGS += -Wl,-E $(STGLIBS_LIBS)
38 .PHONY: all clean distclean libs plugins
39 all: libs plugins $(PROG) ../../Makefile.conf
42 $(MAKE) -C $(DIR_LIBSRC)
45 $(MAKE) -C $(DIR_PLUGINS)
48 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
51 rm -f deps $(PROG) *.o *.*~
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)
69 for file in $(SRCS); do\
70 echo "$$file" | grep ".c$$" > /dev/null;\
73 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\
74 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
76 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
77 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\