1 ###############################################################################
2 # $Id: Makefile.in,v 1.28 2009/03/03 15:50:14 faust Exp $
3 ###############################################################################
5 include ../../Makefile.conf
7 PROG = lib$(LIB_NAME).so
31 ifeq ($(STG_TIME), yes)
35 ifneq ($(ADD_DEFS_1),)
39 SEARCH_DIRS = -I $(DIR_INCLUDE) -I ./
41 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
43 INST_INCS = $(addprefix $(DIR_INCLUDE)/, $(notdir $(INCS)))
44 INST_LIBS = $(DIR_LIB)/lib$(LIB_NAME)
47 LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg
49 ifneq ($(ADD_CXXFLAGS_1),)
50 CXXFLAGS += $(ADD_CXXFLAGS_1)
57 $(PROG): $(OBJS) $(STGLIBS)
58 g++ $(LDFLAGS) -Wl,-soname,$(PROG) $^ $(LIBS) -o $(PROG) -L $(DIR_LIB)
59 ar rc lib$(LIB_NAME).a $(OBJS)
60 ranlib lib$(LIB_NAME).a
65 cp -p $(INCS) $(DIR_INCLUDE)
68 rm -f deps $(PROG) *.o *.a *.so tags *.*~
69 for file in $(INCS); do \
70 rm -f $(DIR_INCLUDE)/$$file; \
74 mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/lib/stg
75 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
78 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
80 ifneq ($(MAKECMDGOALS),includes)
81 ifneq ($(MAKECMDGOALS),clean)
82 ifneq ($(MAKECMDGOALS),uninstall)
88 deps: $(SRCS) ../../Makefile.conf
90 for file in $(SRCS); do\
91 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM -MG $$file` Makefile ../../Makefile.conf" >> deps ;\
92 echo -e '\t$$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\