enable build on sparc-solaris
[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 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$(topsrcdir)/../../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$(topsrcdir)/../../include/pic16
68
69 #################################################
70 ### linker switches
71 LDFLAGS ?=
72 LDFLAGS += -m -l -w
73
74 #################################################
75 ### librarian switches
76 LIBFLAGS ?=
77 LIBFLAGS += -c
78
79 #################################################
80 ### programs to use
81 CPP     = $(topsrcdir)/../../../bin/sdcpp
82 CC      = $(topsrcdir)/../../../bin/sdcc
83 AS      = @GPASM@
84 LD      = @GPLINK@
85 LIB     = @GPLIB@
86
87 SED     ?= @SED@
88 GREP    ?= @EGREP@
89
90 MKDIR   ?= @MKDIR@
91 RMDIR   ?= @RMDIR@
92 CP      ?= @CP@
93 MV      ?= @MV@
94 RM      ?= @RM@
95