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)
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)
46 CXXFLAGS += -fPIC $(DEFS)
47 LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg
53 $(PROG): $(OBJS) $(STGLIBS)
54 $(CXX) $(LDFLAGS) -Wl,-soname,$(PROG) $^ $(LIBS) -o $(PROG) -L $(DIR_LIB)
55 ar rc lib$(LIB_NAME).a $(OBJS)
56 ranlib lib$(LIB_NAME).a
61 cp -p $(INCS) $(DIR_INCLUDE)/stg
64 rm -f deps $(PROG) *.o *.a *.so tags *.*~
65 for file in $(INCS); do \
66 rm -f $(DIR_INCLUDE)/stg/$$file; \
70 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
71 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
72 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
73 install -m $(BIN_MODE) -o $(OWNER) -t $(PREFIX)/usr/include/stg/ $(INCS)
76 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
77 for file in $(INCS); do \
78 rm -f $(PREFIX)/usr/include/stg/$$file; \
81 ifneq ($(MAKECMDGOALS),includes)
82 ifneq ($(MAKECMDGOALS),clean)
83 ifneq ($(MAKECMDGOALS),uninstall)
89 deps: $(SRCS) ../../Makefile.conf
91 for file in $(SRCS); do\
92 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM -MG $$file` Makefile ../../Makefile.conf" >> deps ;\
93 echo -e '\t$$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\