2c787dfd70d087b357461e159a700ee0e63be43e
[fw/sdcc] / device / lib / pic16 / Makefile.common.in
1 ###########################################################
2 ### Makefile.common.in for the GNU PIC Library
3 ###
4 ### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
5 ###
6 ### The GNU PIC Library was originally designed and
7 ### implemented by
8 ###     Vangelis Rokas <vrokas@otenet.gr>
9 ###
10 ### It is currently maintained by
11 ###     Raphael Neider <rneider@web.de>
12 ###
13 ### This file may be distributed under the terms of the the
14 ### GNU General Public License (GPL). See COPYING for details.
15 ###
16 ### $Id$
17 ###
18
19 #################################################
20 ### verboseness
21 #Q      ?=              # be verbose
22 Q       ?= @            # be quiet
23 # be really quiet (suppress "Entering/Leaving directory...")
24 #MAKEFLAGS := $(filter-out -s,$(MAKEFLAGS)) -s
25
26 #################################################
27 ### compiler switches
28 ARCH   ?= 452           # might be overwritten in libio
29
30 CFLAGS ?=
31 CFLAGS += -mpic16 -p18f$(ARCH)
32 CFLAGS += --std-c99
33 CFLAGS += -I. -I$(topsrcdir)/../../include/pic16
34
35 #################################################
36 ### optimization flags
37 CFLAGS += --fommit-frame-pointer
38 CFLAGS += --obanksel=9
39 CFLAGS += --denable-peeps
40 CFLAGS += --optimize-goto
41 CFLAGS += --optimize-cmp
42 CFLAGS += --optimize-df
43
44 #################################################
45 ### debugging PIC16 port
46 #CFLAGS += --debug-ralloc
47 #CFLAGS += --debug-xtra
48 #CFLAGS += --pcode-verbose
49 CFLAGS += --i-code-in-asm
50
51 #################################################
52 ### debugging SDCC's optimizations
53 #CFLAGS += --nooverlay
54 #CFLAGS += --nogcse
55 #CFLAGS += --nolabelopt
56 #CFLAGS += --noinvariant
57 #CFLAGS += --noinduction
58 #CFLAGS += --nojtbound
59 #CFLAGS += --noloopreverse
60
61 #################################################
62 ### assembler switches
63 ASFLAGS ?=
64 ASFLAGS += -pp18f$(ARCH)
65 ASFLAGS += -I$(topsrcdir)/../../include/pic16
66
67 #################################################
68 ### linker switches
69 LDFLAGS ?=
70 LDFLAGS += -m -l -w
71
72 #################################################
73 ### librarian switches
74 LIBFLAGS ?=
75 LIBFLAGS += -c
76
77 #################################################
78 ### programs to use
79 CPP     = $(topsrcdir)/../../../bin/sdcpp
80 CC      = $(topsrcdir)/../../../bin/sdcc
81 AS      = @GPASM@
82 LD      = @GPLINK@
83 LIB     = @GPLIB@
84
85 SED     ?= @SED@
86 GREP    ?= @EGREP@
87
88 MKDIR   ?= @MKDIR@
89 RMDIR   ?= @RMDIR@
90 CP      ?= @CP@
91 MV      ?= @MV@
92 RM      ?= @RM@
93