* device/lib/Makefile.in: removed comment line with model-pic16,
[fw/sdcc] / device / lib / pic16 / libsdcc / Makefile.rules
1 #
2 # Makefile.rules - Common Makefile rules to build pic16
3 #                  support libraries
4 #
5 # This file is part of the GNU PIC Library.
6 #
7 # January, 2004
8 # The GNU PIC Library is maintained by,
9 #       Vangelis Rokas <vrokas@otenet.gr>
10 #
11 # $Id$
12 #
13 #
14
15
16 include ../../Makefile.common
17
18 PRJDIR  = ../../../../..
19
20 LIBC_INC_DIR    = $(PRJDIR)/device/include/pic16
21
22 COMPILE_FLAGS   += $(MODELFLAGS) --pomit-config-words --pomit-ivt --no-peep --i-code-in-asm
23
24 CFILES  = $(patsubst %,%.c,$(SRCS))
25 OFILES  = $(patsubst %.c,%.o,$(CFILES))
26
27 %.o: %.c
28         $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
29
30
31 all: build-library
32
33 clean-intermediate:
34         $(RM) -f *.lst *.asm *.dump* *.p *.d *.adb
35
36
37 clean: clean-intermediate
38         $(RM) -f $(LIB) *.o
39
40 dep .depend:
41         rm -f .depend
42         for temp in $(CFILES); do \
43                 $(CPP) $(MM) $(CFLAGS) $$temp > .tmpdepend; \
44                 $(SED) s/.rel/.o/g .tmpdepend >> .depend; \
45                 $(RM) -f .tmpdepend; \
46         done;
47
48 include .depend