# ### BOILERPLATE ### # Orthographic Cube Firmware # Copyright (C) 2006 Peter Todd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ### BOILERPLATE ### INCLUDE=-I. -I/usr/share/sdcc/include/pic16 PROCESSOR_FLAGS=-mpic16 -p18f6520 CC=sdcc AS=gpasm CFLAGS=-V -S --debug OBJS=main.o all: led_controller.hex burn: led_controller.hex picp /dev/ttyUSB0 18f6520 -ef picp /dev/ttyUSB0 18f6520 -wp led_controller.hex proj_lookup.tbl: proj_lookup.pl ./proj_lookup.pl > proj_lookup.tbl main.asm: main.c led_display.c lines.c cube.c proj_lookup.tbl $(CC) $(INCLUDE) $(PROCESSOR_FLAGS) $(CFLAGS) main.c main.o: main.asm $(AS) -c $*.asm led_controller.hex: main.asm main.o /usr/bin/gplink -I"." -I"/usr/bin/../share/sdcc/lib/pic16" -I"/usr/share/sdcc/lib/pic16" -o led_controller.hex main.o crt0i.o libc18f.lib pic18f6520.lib libsdcc.lib libio18f6520.lib clean: $(RM) *.asm *.cod *.lst *.hex *.p *.d *.lnk *.o *~