* src/pic16/gen.c (genrshTwo): fixed sign extension
[fw/sdcc] / device / lib / pic16 / debug / Makefile.rules
1 #
2 # Makefile.rules - Common Makefile rules to build pic16
3 #                  debug library
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) $(OPT_FLAGS)
23
24 CPPFLAGS        := -nostdinc -I$(LIBC_INC_DIR)
25 CFLAGS  += --nostdinc -I$(LIBC_INC_DIR)
26
27 CFILES  = $(patsubst %,%.c,$(SRCS))
28 OFILES  = $(patsubst %.c,%.o,$(CFILES))
29
30 %.o: %.c
31         $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
32
33
34 all: build-library
35
36 clean-intermediate:
37         $(RM) -f *.lst *.asm *.dump* *.p *.d *.adb
38
39
40 clean: clean-intermediate
41         $(RM) -f $(LIB) *.o
42
43 dep .depend:
44         rm -f .depend
45         for temp in $(CFILES); do \
46                 $(CPP) $(MM) $(CPPFLAGS) $$temp > .tmpdepend; \
47                 $(SED) s/.rel/.o/g .tmpdepend >> .depend; \
48                 $(RM) -f .tmpdepend; \
49         done;
50
51 include .depend