#*-------------------------------------------------------------------------- #* Makefile Template for starting new development #* #* Written By - Philippe Latu / philippe.latu(at)linux-france.org #* $Id: Makefile.tpl 1152 2007-06-04 22:40:17Z latu $ #* #* Copyright (C) 2006,2007 Philippe Latu #* #* This library is free software; you can redistribute it and/or #* modify it under the terms of the GNU Lesser General Public #* License as published by the Free Software Foundation; either #* version 2.1 of the License, or (at your option) any later version. #* #* This library is distributed in the hope that it will be useful, #* but WITHOUT ANY WARRANTY; without even the implied warranty of #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #* Lesser General Public License for more details. #* #* You should have received a copy of the GNU Lesser General Public #* License along with this library; if not, write to the Free Software #* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #* #*---------------------------------------------------------------------------*/ # Source filename without extension BASENAME = whatever #*-------------------------------------------------------------------------- #* Compilation memory model #* #* --model-small: small is the default #* When the small model is used variables without storage class are allocated #* in the internal ram. The small model supports only integer numbers #* #* --model-large: #* When the large model is used all variables declared without a storage class #* will be allocated into the external ram, this includes all parameters and #* local variables (for non-reentrant functions). The large model supports #* floating point numbers. #* #* SDCC Debugging options #* #* --debug: C language side #* -plogsffc: assembler side #* #* Custom Debugging options #* #* -DDEBUG: debug macro defined in C source files and headers #* #* for more options: RTFM http://sdcc.sourceforge.net/doc/sdccman.html/ #*---------------------------------------------------------------------------*/ CFLAGS = --model-small ASXFLAGS = -plogsff all: $(BASENAME).ihx $(BASENAME).ihx: $(BASENAME).rel rom1210.rel sdcc $(BASENAME).rel rom1210.rel packihx $@ > $@.new ; mv $@.new $@ $(BASENAME).rel: $(BASENAME).c $(wildcard *.h) sdcc -c $< rom1210.rel: rom1210.asm asx8051 $(ASXFLAGS) $< .PHONY: clean clean: rm -f *.rel *.lst *.sym *.map *.mem *.lnk *.ihx *.rst