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_PATHS = $(addprefix -L ../../../../../stglibs/,$(addsuffix .lib,$(STGLIBS)))
14 STGLIBS_LIBS = $(addprefix -lstg,$(STGLIBS))
16 CXXFLAGS += -fPIC $(STGLIBS_INCS)
17 CFLAGS += -fPIC $(STGLIBS_INCS)
20 LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg
22 LDFLAGS += -dynamiclib -undefined suppress -flat_namespace -Wl,-rpath,$(PREFIX)/usr/lib/stg
28 $(CXX) $^ $(STGLIBS_PATHS) $(STGLIBS_LIBS) $(LIBS) $(LDFLAGS) -o $(PROG)
29 $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG)
32 rm -f deps $(PROG) *.o tags *.*~
35 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
37 install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
39 install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
43 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
45 ifneq ($(MAKECMDGOALS),clean)
46 ifneq ($(MAKECMDGOALS),uninstall)
51 deps: $(SRCS) ../../../../../Makefile.conf
53 for file in $(SRCS); do\
54 echo "$$file" | grep ".c$$" > /dev/null;\
57 echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
58 printf '%b\n' '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
60 echo "`$(CXX) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
61 printf '%b\n' '\t$$(CXX) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\