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)/$$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)
74 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
76 ifneq ($(MAKECMDGOALS),includes)
77 ifneq ($(MAKECMDGOALS),clean)
78 ifneq ($(MAKECMDGOALS),uninstall)
84 deps: $(SRCS) ../../Makefile.conf
86 for file in $(SRCS); do\
87 echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM -MG $$file` Makefile ../../Makefile.conf" >> deps ;\
88 echo -e '\t$$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\