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))))
13 LDFLAGS += -shared -L$(DIR_LIB) -Wl,-rpath,$(PREFIX)/usr/lib/stg
19 $(PROG): $(OBJS) $(STGLIBS)
20 $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
21 $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG)
24 rm -f deps $(PROG) *.o tags *.*~
27 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
28 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
31 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
33 ifneq ($(MAKECMDGOALS),clean)
34 ifneq ($(MAKECMDGOALS),uninstall)
39 deps: $(SRCS) ../../../../../Makefile.conf
41 for file in $(SRCS); do\
42 echo "$$file" | grep ".c$$" > /dev/null;\
45 echo "`$(CC) $(CFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
46 echo -e '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
48 echo "`$(CXX) $(CXXFLAGS) $(DEFS) $(SEARCH_DIRS) -MM $$file` Makefile ../../../../../Makefile.conf" >> deps ;\
49 echo -e '\t$$(CXX) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\