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 *.*~
38 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
39 install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
40 mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
41 install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
44 rm -f $(PREFIX)/usr/lib/stg/$(PROG)
45 for file in $(INCS); do \
46 rm -f $(PREFIX)/usr/include/stg/$$file; \
49 ifneq ($(MAKECMDGOALS),includes)
50 ifneq ($(MAKECMDGOALS),clean)
51 ifneq ($(MAKECMDGOALS),uninstall)
57 deps: $(SRCS) ../../Makefile.conf
59 for file in $(SRCS); do\
60 echo "$$file" | grep ".c$$" > /dev/null;\
63 echo "`$(CC) $(CFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
64 printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
66 echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
67 printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\