2 # Makefile.rules - Common Makefile rules to build pic16
5 # This file is part of the GNU PIC Library.
8 # The GNU PIC Library is maintained by,
9 # Vangelis Rokas <vrokas@otenet.gr>
16 include ../../Makefile.common
18 PRJDIR = ../../../../..
20 LIBC_INC_DIR = $(PRJDIR)/device/include/pic16
22 COMPILE_FLAGS += $(MODELFLAGS) --pomit-config-words --pomit-ivt --denable-peeps --optimize-goto --obanksel=2 --i-code-in-asm
23 CFLAGS = --nostdinc -I$(LIBC_INC_DIR)
25 CFILES = $(patsubst %,%.c,$(SRCS))
26 OFILES = $(patsubst %.c,%.o,$(CFILES))
29 $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
35 $(RM) -f *.lst *.asm *.dump* *.p *.d *.adb
38 clean: clean-intermediate
43 for temp in $(CFILES); do \
44 $(CPP) $(MM) $(CFLAGS) $$temp > .tmpdepend; \
45 $(SED) s/.rel/.o/g .tmpdepend >> .depend; \
46 $(RM) -f .tmpdepend; \