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).a
9 SEARCH_DIRS = -I ../../include -I . -I ./include
11 ifeq ($(STG_TIME), yes)
20 SEARCH_DIRS += $(LIB_INCS)
23 OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))))
25 CXXFLAGS += -fPIC $(SEARCH_DIRS) $(DEFS)
26 CFLAGS += -fPIC $(SEARCH_DIRS) $(DEFS)
31 $(AR) rc lib$(LIB_NAME).a $(OBJS)
32 $(RANLIB) lib$(LIB_NAME).a
35 rm -f deps $(PROG) *.o *.a *.so tags *.*~
39 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
40 install -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
42 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
43 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
45 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
46 install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
49 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
50 for file in $(INCS); do \
51 rm -f $(PREFIX)/usr/include/stg/$$file; \
54 ifneq ($(MAKECMDGOALS),includes)
55 ifneq ($(MAKECMDGOALS),clean)
56 ifneq ($(MAKECMDGOALS),uninstall)
62 deps: $(SRCS) ../../Makefile.conf
64 for file in $(SRCS); do\
65 echo "$$file" | grep ".c$$" > /dev/null;\
68 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
69 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
71 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
72 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\