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