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