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)
18 ASRC0
+= config.inc macros.inc init.asm dram-refresh.asm timer.asm utils.asm
19 ASRC0
+= mmc.asm mmc-old.asm virt_ports.asm
20 ASRC0
+= dsk_cpm.asm dsk_fat16.asm dsk_fsys.asm dsk_mgr.asm dsk_ram.asm
21 ASRC0
+= 8080int-orig.asm
8080int.asm
8080int-jmp.asm
8080int-t3.asm
8080int-t3-jmp.asm Z80int-jmp.asm
23 ifneq ($(DRAM_8BIT
),0)
24 ASRC0
+= dram-8bit.inc dram-8bit.asm sw-uart.asm i2c.asm
26 ASRC0
+= dram-4bit.inc dram-4bit.asm hw-uart.asm
29 #ASRC := $(ASRC0) svnrev.inc
30 ASRC
:= $(ASRC0
) svnrev.inc
32 # Place -D or -U options here
33 CDEFS
= -DF_CPU
=$(F_CPU
) -DBAUD
=$(BAUD
) -D
$(MCU
) -DDRAM_8BIT
=$(DRAM_8BIT
)
38 ASPATH
= C
:/Programme
/Atmel
/AVR\ Tools
/AvrAssembler2
39 DEFS
= $(ASPATH
)/Appnotes
41 ifeq "$(OS)" "Windows_NT"
48 ifeq ($(PLATFORM
),Linux
)
52 AS
= $(WINE
) $(ASPATH
)/avrasm2.exe
53 ASFLAGS
= -I
$(DEFS
) $(CDEFS
)
55 # Programming support using avrdude. Settings and variables.
57 AVRDUDE_PROGRAMMER
= dragon_isp
60 AVRDUDE_WRITE_FLASH
= -U flash
:w
:$(TARGET
).hex
61 AVRDUDE_WRITE_EEPROM
= -U eeprom
:w
:$(TARGET
).eep
64 # Uncomment the following if you want avrdude's erase cycle counter.
65 # Note that this counter needs to be initialized first using -Yn,
67 #AVRDUDE_ERASE_COUNTER = -y
69 # Uncomment the following if you do /not/ wish a verification to be
70 # performed after programming the device.
71 #AVRDUDE_NO_VERIFY = -V
73 # Increase verbosity level. Please use this when submitting bug
74 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
75 # to submit bug reports.
76 #AVRDUDE_VERBOSE = -v -v
78 AVRDUDE_BASIC
= -p
$(MCU
) -P
$(AVRDUDE_PORT
) -c
$(AVRDUDE_PROGRAMMER
)
79 AVRDUDE_FLAGS
= $(AVRDUDE_BASIC
) $(AVRDUDE_NO_VERIFY
) $(AVRDUDE_VERBOSE
) $(AVRDUDE_ERASE_COUNTER
)
86 # Define all listing files.
87 #LST = $(ASRC:.asm=.lst)
89 # Combine all necessary flags and optional flags.
90 # Add target processor to flags.
91 ALL_ASFLAGS
= $(ASFLAGS
)
93 .PHONY
: all hex eep lst map program flash eeprom
tags clean
98 hex
: $(TARGET
).hex
$(ASRC
)
99 eep
: $(TARGET
).eep
$(ASRC
)
100 lst
: $(TARGET
).lst
$(ASRC
)
101 map
: $(TARGET
).map
$(ASRC
)
104 # Program the device.
105 program
: $(TARGET
).hex
$(TARGET
).eep
106 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
) $(AVRDUDE_WRITE_EEPROM
)
109 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
)
111 eeprom
: $(TARGET
).hex
$(TARGET
).eep
112 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_EEPROM
)
115 $(TARGET
).hex
: $(ASRC
)
116 $(TARGET
).eep
: $(ASRC
)
117 $(TARGET
).lst
: $(ASRC
)
118 $(TARGET
).map
: $(ASRC
)
120 #.SUFFIXES: .hex .eep .lst
124 $(AS
) $(ALL_ASFLAGS
) -fI
-o
$@
$<
127 @
$(AS
) $(ALL_ASFLAGS
) -v0
-f-
-l
$@
$<
130 $(AS
) $(ALL_ASFLAGS
) -v0
-f-
-m
$@
$<
136 @svnrev
-osvnrev.inc
$^
138 # Target: clean project.
140 $(REMOVE
) $(TARGET
).hex
$(TARGET
).eep
$(TARGET
).obj
$(TARGET
).map
$(TARGET
).lst