1 CC = $(CROSS_COMPILE)gcc
2 CPP = $(CROSS_COMPILE)g++
3 LD = $(CROSS_COMPILE)gcc
4 AR = $(CROSS_COMPILE)ar
5 RANLIB = $(CROSS_COMPILE)ranlib
7 INCS +=-Wundef -Wall -pipe -Os
8 #INCS +=-Werror -Wundef -Wall -pipe -Os
9 CFLAGS += $(INCS) $(CPPFLAGS)
11 OBJS=$(addprefix objects/, $(addsuffix .o, $(basename $(notdir $(SRC)))))
17 all: objects deps subdirs $(OBJS) $(TARGET) $(BIN)
19 # automatic generation of all the rules written by vincent by hand.
21 @echo "Generating new dependency file...";
23 @for f in $(SRC); do \
24 OBJ=objects/`basename $$f|sed -e 's/\.cpp/\.o/' -e 's/\.cxx/\.o/' -e 's/\.c/\.o/'`; \
25 echo $$OBJ: $$f>> deps; \
26 echo ' $(CC) $$(CFLAGS) -c -o $$@ $$^'>> deps; \
40 @ln -s `g++ -print-file-name=libstdc++.a` -f
41 $(LD) $(OBJS) $(LIBS) -o $@
46 for subdir in $$list; do \
47 echo "Making $$target in $$subdir"; \
48 cd $$subdir && $(MAKE); \
54 for subdir in $$list; do \
55 echo "Making $$target in $$subdir"; \
56 cd $$subdir && $(MAKE) clean; \
61 rm -rf $(OBJS) *.o *~ .*swp objects deps $(CLEANFILE) $(BIN) $(TARGET)