2 # Makefile.rules - Common Makefile rules to build pic16 C Library
4 # This file is part of the GNU PIC Library.
7 # The GNU PIC Library is maintained by,
8 # Vangelis Rokas <vrokas@otenet.gr>
15 include ../../Makefile.common
17 PRJDIR = ../../../../..
19 LIBC_INC_DIR = $(PRJDIR)/device/include/pic16
21 COMPILE_FLAGS += $(MODELFLAGS) --pomit-config-words --pomit-ivt --no-peep --i-code-in-asm
22 CFLAGS = -I$(LIBC_INC_DIR)
24 CFILES = $(patsubst %,%.c,$(SRCS))
25 OFILES = $(patsubst %.c,%.o,$(CFILES))
28 $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
34 $(RM) -f *.lst *.asm *.dump* *.p *.d *.adb
37 clean: clean-intermediate
42 for temp in $(CFILES); do \
43 $(CPP) $(MM) $(CFLAGS) $$temp > .tmpdepend; \
44 $(SED) s/.rel/.o/g .tmpdepend >> .depend; \
45 $(RM) -f .tmpdepend; \