2 # Makefile - Makefile to build startup files
4 # This file is part of the GNU PIC Library.
7 # The GNU PIC Library is maintained by,
8 # Vangelis Rokas <vrokas@otenet.gr>
16 include ../Makefile.common
24 # add nostdinc and nostdlib for this device libraries
25 COMPILE_FLAGS += $(MODELFLAGS) $(OPT_FLAGS)
26 COMPILE_FLAGS += --nostdinc --nostdlib --fommit-frame-pointer
30 CFILES = $(patsubst %,%.c,$(SRCS))
31 OFILES = $(patsubst %.c,%.o,$(CFILES))
35 $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
39 @$(CP) -v $(OFILES) ../bin
41 build-library: compile-sources
43 compile-sources: $(OFILES)
51 $(RM) -f *.lst *.asm *.dump*
55 for temp in $(CFILES); do \
56 $(CPP) $(MM) $(CFLAGS) $$temp > .tmpdepend; \
57 $(SED) s/.rel/.o/g .tmpdepend >> .depend; \
58 $(RM) -f .tmpdepend; \