1 ###############################################################################
2 # $Id: Makefile.in,v 1.11 2009/03/03 15:49:35 faust Exp $
3 ###############################################################################
5 SEARCH_DIRS = -I $(DIR_INCLUDE)
7 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
11 STGLIBS_INCS = $(addprefix -I ../../../../../stglibs/,$(addsuffix .lib/include,$(STGLIBS)))
12 STGLIBS_LIBS = $(addprefix -L ../../../../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
14 LIBS += $(addprefix -lstg,$(STGLIBS))
16 CXXFLAGS += -fPIC $(STGLIBS_INCS)
17 CFLAGS += -fPIC $(STGLIBS_INCS)
18 LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg
23 $(CXX) $^ $(STGLIBS_LIBS) $(LIBS) $(LDFLAGS) -o $(PROG)
24 $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG)
27 rm -f deps $(PROG) *.o tags *.*~
30 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
32 install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
34 install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
38 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
40 ifneq ($(MAKECMDGOALS),clean)
41 ifneq ($(MAKECMDGOALS),uninstall)
46 deps: $(SRCS) ../../../../../Makefile.conf
48 for file in $(SRCS); do\
49 echo "$$file" | grep ".c$$" > /dev/null;\
52 echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
53 printf '%b\n' '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
55 echo "`$(CXX) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
56 printf '%b\n' '\t$$(CXX) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\