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 install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
41 install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
43 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
44 install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
47 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
48 for file in $(INCS); do \
49 rm -f $(PREFIX)/usr/include/stg/$$file; \
52 ifneq ($(MAKECMDGOALS),includes)
53 ifneq ($(MAKECMDGOALS),clean)
54 ifneq ($(MAKECMDGOALS),uninstall)
60 deps: $(SRCS) ../../Makefile.conf
62 for file in $(SRCS); do\
63 echo "$$file" | grep ".c$$" > /dev/null;\
66 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
67 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
69 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
70 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\