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 $(STGLIBS_LIBS)
23 $(CXX) $^ $(LDFLAGS) $(LIBS) -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
31 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
34 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
36 ifneq ($(MAKECMDGOALS),clean)
37 ifneq ($(MAKECMDGOALS),uninstall)
42 deps: $(SRCS) ../../../../../Makefile.conf
44 for file in $(SRCS); do\
45 echo "$$file" | grep ".c$$" > /dev/null;\
48 echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
49 printf '%b\n' '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
51 echo "`$(CXX) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
52 printf '%b\n' '\t$$(CXX) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\