70b35369ab809dd74a74e54c8285296781f0a972
[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 AT web.de>
5 ###
6 ### The library is currently maintained by
7 ###     Raphael Neider <rneider AT 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 might be overwritten in libio
27 ARCH   ?= 877
28
29 CFLAGS ?=
30 CFLAGS += -mpic14 -p16f$(ARCH)
31 CFLAGS += --std-c99
32 CFLAGS += -I. -I$(top_srcdir)/../../include/pic
33
34 #################################################
35 ### optimization flags
36
37 #################################################
38 ### debugging PIC14 port
39 #CFLAGS += --debug-ralloc
40 #CFLAGS += --debug-xtra
41 #CFLAGS += --pcode-verbose
42 CFLAGS += --i-code-in-asm
43
44 #################################################
45 ### debugging SDCC's optimizations
46 #CFLAGS += --nooverlay
47 #CFLAGS += --nogcse
48 #CFLAGS += --nolabelopt
49 #CFLAGS += --noinvariant
50 #CFLAGS += --noinduction
51 #CFLAGS += --nojtbound
52 #CFLAGS += --noloopreverse
53
54 #################################################
55 ### assembler switches
56 ASFLAGS ?=
57 ASFLAGS += -pp16f$(ARCH)
58 ASFLAGS += -I$(top_srcdir)/../../include/pic
59 ASFLAGS += -I. -I$(srcdir)
60
61 #################################################
62 ### linker switches
63 LDFLAGS ?=
64 LDFLAGS += -m -l -w
65
66 #################################################
67 ### librarian switches
68 LIBFLAGS ?=
69 LIBFLAGS += -c
70
71 #################################################
72 ### programs to use
73 CPP     = $(top_builddir)../../../bin/sdcpp
74 CC      = $(top_builddir)../../../bin/sdcc
75 AS      = @GPASM@
76 LD      = @GPLINK@
77 LIB     = @GPLIB@
78
79 SED     ?= @SED@
80 GREP    ?= @EGREP@
81
82 MKDIR   ?= @MKDIR@
83 RMDIR   ?= @RMDIR@
84 CP      ?= @CP@
85 MV      ?= @MV@
86 RM      ?= @RM@
87