X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Flib%2Fpic16%2FMakefile.common.in;h=842103facd7764ff0fe41c8343fe35aba5caf817;hb=d0a5b914c6ed80027a8c64d55d84c3d75ec28c38;hp=a7d77c5d56c25cceff245151ad7b5401a2791988;hpb=6474449850aeace128aebe2d7f387ac7c550bcc5;p=fw%2Fsdcc diff --git a/device/lib/pic16/Makefile.common.in b/device/lib/pic16/Makefile.common.in index a7d77c5d..842103fa 100644 --- a/device/lib/pic16/Makefile.common.in +++ b/device/lib/pic16/Makefile.common.in @@ -1,36 +1,95 @@ -# -# Makefile.common - common variables makefile -# -# This file is part of the GNU PIC Library. -# -# January, 2004 -# The GNU PIC Library is maintained by, -# Vangelis Rokas -# -# $Id$ -# -# - -CC = $(PRJDIR)/bin/sdcc -CPP = $(PRJDIR)/bin/sdcpp +########################################################### +### Makefile.common.in for the GNU PIC Library +### +### Copyright (C) 2005 by Raphael Neider +### +### The GNU PIC Library was originally designed and +### implemented by +### Vangelis Rokas +### +### It is currently maintained by +### Raphael Neider +### +### This file may be distributed under the terms of the the +### GNU General Public License (GPL). See COPYING for details. +### +### $Id$ +### +SHELL = bash + +################################################# +### verboseness +#Q ?= # be verbose +Q ?= @ # be quiet +# be really quiet (suppress "Entering/Leaving directory...") +#MAKEFLAGS := $(filter-out -s,$(MAKEFLAGS)) -s + +################################################# +### compiler switches +ARCH ?= 452 # might be overwritten in libio + +CFLAGS ?= +CFLAGS += -mpic16 -p18f$(ARCH) +CFLAGS += --std-c99 +CFLAGS += -I. -I$(topsrcdir)/../../include/pic16 + +################################################# +### optimization flags +CFLAGS += --fommit-frame-pointer +CFLAGS += --obanksel=9 +CFLAGS += --denable-peeps +CFLAGS += --optimize-goto +CFLAGS += --optimize-cmp +CFLAGS += --optimize-df + +################################################# +### debugging PIC16 port +#CFLAGS += --debug-ralloc +#CFLAGS += --debug-xtra +#CFLAGS += --pcode-verbose +CFLAGS += --i-code-in-asm + +################################################# +### debugging SDCC's optimizations +#CFLAGS += --nooverlay +#CFLAGS += --nogcse +#CFLAGS += --nolabelopt +#CFLAGS += --noinvariant +#CFLAGS += --noinduction +#CFLAGS += --nojtbound +#CFLAGS += --noloopreverse + +################################################# +### assembler switches +ASFLAGS ?= +ASFLAGS += -pp18f$(ARCH) +ASFLAGS += -I$(topsrcdir)/../../include/pic16 + +################################################# +### linker switches +LDFLAGS ?= +LDFLAGS += -m -l -w + +################################################# +### librarian switches +LIBFLAGS ?= +LIBFLAGS += -c + +################################################# +### programs to use +CPP = $(topsrcdir)/../../../bin/sdcpp +CC = $(topsrcdir)/../../../bin/sdcc AS = @GPASM@ LD = @GPLINK@ -AR = @GPLIB@ - -RM = @RM@ -CP = @CP@ -MV = @MV@ -LS = @LS@ -SED = @SED@ +LIB = @GPLIB@ -# Quick+dirty fix: this should be defined elsewhere, -# but it's needed for `make clean`; Bernhard -MM = -MM +SED ?= @SED@ +GREP ?= @EGREP@ -MODELFLAGS = -mpic16 +MKDIR ?= @MKDIR@ +RMDIR ?= @RMDIR@ +CP ?= @CP@ +MV ?= @MV@ +RM ?= @RM@ -OPT_FLAGS += --denable-peeps -OPT_FLAGS += --obanksel=9 -OPT_FLAGS += --optimize-goto -OPT_FLAGS += --i-code-in-asm