# http://neil.franklin.ch/Projects/SoftVGA/Makefile # author Neil Franklin, last modification 2009.03.14 # --- various site dependant user config variables # for creating an [-].tar.gz archive DIR = SoftVGA # program we are currently working on #PROG = blink #PROG = vga_static #PROG = vga_text_static #PROG = vga_threaded PROG = vga_indirect # --- no user configurable stuff below here # --- code for acting out the various make targets all: hex hex: $(PROG).hex $(PROG).hex: $(PROG).asm avr m32 font digits @# actual program needs assembling, from source and includes @avra -W NoRegDef -fI -o $(PROG).hex -l $(PROG).list $(PROG).asm avr: avr_registers.inc m32: m32def.inc font: vga_text_font.inc vga_text_font.inc: vga_text_font.fon genfont @# actual font code include needs generating, from font data @genfont vga_text_font.fon vga_text_font.inc digits: vga_defont_digits.inc vga_defont_digits.inc: vga_defont_digits.fon genfont @genfont vga_defont_digits.fon vga_defont_digits.inc clean: @rm -f $(PROG).cof $(PROG).eep.hex $(PROG).hex $(PROG).list $(PROG).obj distclean: clean install: @# install/upload/flash onto ATmega @avrdude -v -c pony-stk200 -p m32 -U flash:w:$(PROG).hex uninstall: @# do nothing, no uninstalling, only overwriting @echo "How do I uninstall something from Flash?" # --- project management stuff tar: @# package this project into an .tar.gz for one nice download @echo packaging source and doc files into an .tar.gz ... @(cd .. ; tar zcf $(DIR).tar.gz \ $(DIR)/Design $(DIR)/FAQ $(DIR)/INSTALL $(DIR)/Logfile \ $(DIR)/Makefile $(DIR)/README $(DIR)/SoftVGAlogo.jpg \ $(DIR)/avr_registers.inc \ $(DIR)/index.html.de $(DIR)/index.html.en $(DIR)/m32def.inc \ $(DIR)/.current $(DIR)/blink_test $(DIR)/vga_indirect \ $(DIR)/vga_static $(DIR)/vga_text_static $(DIR)/vga_threaded ) ..tar: @# package stuff while still in work directories @(cd ..; make tar)