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) $(LIBICONV)
27 SEARCH_DIRS = -I ../../include
29 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
31 CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
32 CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS)
38 LDFLAGS += $(STGLIBS_LIBS)
40 .PHONY: all clean distclean libs plugins
41 all: libs plugins $(PROG) ../../Makefile.conf
44 $(MAKE) -C $(DIR_LIBSRC)
47 $(MAKE) -C $(DIR_PLUGINS)
50 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
53 rm -f deps $(PROG) *.o *.*~
54 $(MAKE) -C $(DIR_LIBSRC) clean
55 $(MAKE) -C $(DIR_PLUGINS) clean
58 rm -f ../../Makefile.conf
60 ifneq ($(MAKECMDGOALS),distclean)
61 ifneq ($(MAKECMDGOALS),clean)
62 ifneq ($(MAKECMDGOALS),uninstall)
68 deps: $(SRCS) ../../Makefile.conf
69 $(MAKE) -C $(DIR_LIBSRC)
71 for file in $(SRCS); do\
72 echo "$$file" | grep ".c$$" > /dev/null;\
75 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\
76 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
78 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
79 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\