* device/include/asm/pic16/features.h,
[fw/sdcc] / device / lib / pic16 / startup / Makefile
1 #
2 # Makefile - Makefile to build startup files
3 #
4 # This file is part of the GNU PIC Library.
5 #
6 # January, 2004
7 # The GNU PIC Library is maintained by,
8 #       Vangelis Rokas <vrokas@otenet.gr>
9 #
10 # $Id$
11 #
12 #
13
14
15 PRJDIR  = ../../../..
16 include ../Makefile.common
17
18
19 SRCS    =       crt0    \
20                 crt0i   \
21                 crt0iz
22
23
24 # add nostdinc and nostdlib for this device libraries
25 COMPILE_FLAGS   += $(MODELFLAGS) $(OPT_FLAGS)
26 COMPILE_FLAGS   += --nostdinc --nostdlib --fommit-frame-pointer
27
28 CFLAGS  += $(CSTD)
29
30 CFILES  = $(patsubst %,%.c,$(SRCS))
31 OFILES  = $(patsubst %.c,%.o,$(CFILES))
32
33
34 %.o: %.c
35         $(CC) $(CFLAGS) $(COMPILE_FLAGS) -c $<
36
37
38 all: build-library
39         @$(CP) -v $(OFILES) ../bin
40
41 build-library: compile-sources
42
43 compile-sources: $(OFILES)
44
45
46 clean:
47         rm -f *.o *.lst *.asm
48
49
50 clean-intermediate:
51         $(RM) -f *.lst *.asm *.dump*
52
53 dep .depend:
54         rm -f .depend
55         for temp in $(CFILES); do               \
56                 $(CPP) $(MM) $(CFLAGS) $$temp > .tmpdepend;     \
57                 $(SED) s/.rel/.o/g .tmpdepend >> .depend;       \
58                 $(RM) -f .tmpdepend;    \
59         done
60         
61 include .depend