1d41e3808a424f8d11b305ea99e95e882f171898
[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 AT 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 AT 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 SHELL = bash
20
21 #################################################
22 ### verboseness
23 #Q      ?=              # be verbose
24 Q       ?= @            # be quiet
25 # be really quiet (suppress "Entering/Leaving directory...")
26 #MAKEFLAGS := $(filter-out -s,$(MAKEFLAGS)) -s
27
28 #################################################
29 ### compiler switches
30 ARCH   ?= 452           # might be overwritten in libio
31
32 CFLAGS ?=
33 CFLAGS += -mpic16 -p18f$(ARCH)
34 CFLAGS += --std-c99
35 CFLAGS += -I. -I$(top_srcdir)/../../include/pic16
36
37 #################################################
38 ### optimization flags
39 CFLAGS += --fommit-frame-pointer
40 CFLAGS += --obanksel=9
41 CFLAGS += --denable-peeps
42 CFLAGS += --optimize-goto
43 CFLAGS += --optimize-cmp
44 CFLAGS += --optimize-df
45
46 #################################################
47 ### debugging PIC16 port
48 #CFLAGS += --debug-ralloc
49 #CFLAGS += --debug-xtra
50 #CFLAGS += --pcode-verbose
51 CFLAGS += --i-code-in-asm
52
53 #################################################
54 ### debugging SDCC's optimizations
55 #CFLAGS += --nooverlay
56 #CFLAGS += --nogcse
57 #CFLAGS += --nolabelopt
58 #CFLAGS += --noinvariant
59 #CFLAGS += --noinduction
60 #CFLAGS += --nojtbound
61 #CFLAGS += --noloopreverse
62
63 #################################################
64 ### assembler switches
65 ASFLAGS ?=
66 ASFLAGS += -pp18f$(ARCH)
67 ASFLAGS += -I$(top_srcdir)/../../include/pic16
68 ASFLAGS += -I$(srcdir)
69
70 #################################################
71 ### linker switches
72 LDFLAGS ?=
73 LDFLAGS += -m -l -w
74
75 #################################################
76 ### librarian switches
77 LIBFLAGS ?=
78 LIBFLAGS += -c
79
80 #################################################
81 ### programs to use
82 CPP     = $(top_builddir)../../../bin/sdcpp
83 CC      = $(top_builddir)../../../bin/sdcc --asm=@GPASM@
84 AS      = @GPASM@
85 LD      = @GPLINK@
86 LIB     = @GPLIB@
87
88 SED     ?= @SED@
89 GREP    ?= @EGREP@
90
91 MKDIR   ?= @MKDIR@
92 RMDIR   ?= @RMDIR@
93 CP      ?= @CP@
94 MV      ?= @MV@
95 RM      ?= @RM@
96