1 # AVR-ASM Makefile, derived from the WinAVR template (which
2 # is public domain), believed to be neutral to any flavor of "make"
3 # (GNU make, BSD make, SysV make)
17 ASRC
+= config.inc macros.inc init.asm dram-refresh.asm timer.asm utils.asm
18 ASRC
+= mmc.asm mmc-old.asm virt_ports.asm
19 ASRC
+= dsk_cpm.asm dsk_fat16.asm dsk_fsys.asm dsk_mgr.asm dsk_ram.asm
20 ASRC
+= 8080int.asm
8080int-jmp.asm
8080int-t3.asm
8080int-t3-jmp.asm
22 ifneq ($(DRAM_8BIT
),0)
23 ASRC
+= dram-8bit.inc dram-8bit.asm sw-uart.asm
25 ASRC
+= dram-4bit.inc dram-4bit.asm hw-uart.asm
28 # Place -D or -U options here
29 CDEFS
= -DF_CPU
=$(F_CPU
) -DBAUD
=$(BAUD
) -D
$(MCU
) -DDRAM_8BIT
=$(DRAM_8BIT
)
31 WINEPATH
= C
:/Programme
/Atmel
/AVR\ Tools
/AvrAssembler2
32 DEFS
= $(WINEPATH
)/Appnotes
34 AS
= wine
$(WINEPATH
)/avrasm2.exe
35 ASFLAGS
= -I
$(DEFS
) $(CDEFS
)
37 # Programming support using avrdude. Settings and variables.
39 AVRDUDE_PROGRAMMER
= dragon_isp
42 AVRDUDE_WRITE_FLASH
= -U flash
:w
:$(TARGET
).hex
43 AVRDUDE_WRITE_EEPROM
= -U eeprom
:w
:$(TARGET
).eep
46 # Uncomment the following if you want avrdude's erase cycle counter.
47 # Note that this counter needs to be initialized first using -Yn,
49 #AVRDUDE_ERASE_COUNTER = -y
51 # Uncomment the following if you do /not/ wish a verification to be
52 # performed after programming the device.
53 #AVRDUDE_NO_VERIFY = -V
55 # Increase verbosity level. Please use this when submitting bug
56 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
57 # to submit bug reports.
58 #AVRDUDE_VERBOSE = -v -v
60 AVRDUDE_BASIC
= -p
$(MCU
) -P
$(AVRDUDE_PORT
) -c
$(AVRDUDE_PROGRAMMER
)
61 AVRDUDE_FLAGS
= $(AVRDUDE_BASIC
) $(AVRDUDE_NO_VERIFY
) $(AVRDUDE_VERBOSE
) $(AVRDUDE_ERASE_COUNTER
)
68 # Define all listing files.
69 #LST = $(ASRC:.asm=.lst)
71 # Combine all necessary flags and optional flags.
72 # Add target processor to flags.
73 ALL_ASFLAGS
= $(ASFLAGS
)
75 .PHONY
: all hex eep lst map program flash eeprom
tags clean
80 hex
: $(TARGET
).hex
$(ASRC
)
81 eep
: $(TARGET
).eep
$(ASRC
)
82 lst
: $(TARGET
).lst
$(ASRC
)
83 map
: $(TARGET
).map
$(ASRC
)
87 program
: $(TARGET
).hex
$(TARGET
).eep
88 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
) $(AVRDUDE_WRITE_EEPROM
)
91 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
)
93 eeprom
: $(TARGET
).hex
$(TARGET
).eep
94 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_EEPROM
)
97 $(TARGET
).hex
: $(ASRC
)
98 $(TARGET
).eep
: $(ASRC
)
99 $(TARGET
).lst
: $(ASRC
)
100 $(TARGET
).map
: $(ASRC
)
102 #.SUFFIXES: .hex .eep .lst
106 $(AS
) $(ALL_ASFLAGS
) -fI
-o
$@
$<
109 @
$(AS
) $(ALL_ASFLAGS
) -v0
-f-
-l
$@
$<
112 $(AS
) $(ALL_ASFLAGS
) -v0
-f-
-m
$@
$<
119 # Target: clean project.
121 $(REMOVE
) $(TARGET
).hex
$(TARGET
).eep
$(TARGET
).obj
$(TARGET
).map
$(TARGET
).lst