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)
33 LDFLAGS += -Wl,-E $(STGLIBS_LIBS)
35 .PHONY: all clean distclean libs plugins
36 all: libs plugins $(PROG) ../../Makefile.conf
39 $(MAKE) -C $(DIR_LIBSRC)
42 $(MAKE) -C $(DIR_PLUGINS)
45 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
48 rm -f deps $(PROG) *.o *.*~
49 $(MAKE) -C $(DIR_LIBSRC) clean
50 $(MAKE) -C $(DIR_PLUGINS) clean
53 rm -f ../../Makefile.conf
55 ifneq ($(MAKECMDGOALS),distclean)
56 ifneq ($(MAKECMDGOALS),clean)
57 ifneq ($(MAKECMDGOALS),uninstall)
63 deps: $(SRCS) ../../Makefile.conf
64 $(MAKE) -C $(DIR_LIBSRC)
66 for file in $(SRCS); do\
67 echo "$$file" | grep ".c$$" > /dev/null;\
70 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\
71 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
73 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\
74 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\