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 ASRC0
+= config.inc macros.inc init.asm dram-refresh.asm timer.asm utils.asm
18 ASRC0
+= mmc.asm mmc-old.asm virt_ports.asm
19 ASRC0
+= dsk_cpm.asm dsk_fat16.asm dsk_fsys.asm dsk_mgr.asm dsk_ram.asm
20 ASRC0
+= 8080int-orig.asm
8080int.asm
8080int-jmp.asm
8080int-t3.asm
8080int-t3-jmp.asm Z80int-jmp.asm
22 ifneq ($(DRAM_8BIT
),0)
23 ASRC0
+= dram-8bit.inc dram-8bit.asm sw-uart.asm
25 ASRC0
+= dram-4bit.inc dram-4bit.asm hw-uart.asm
28 #ASRC := $(ASRC0) svnrev.inc
29 ASRC
:= $(ASRC0
) svnrev.inc
31 # Place -D or -U options here
32 CDEFS
= -DF_CPU
=$(F_CPU
) -DBAUD
=$(BAUD
) -D
$(MCU
) -DDRAM_8BIT
=$(DRAM_8BIT
)
34 ASPATH
= C
:/Programme
/Atmel
/AVR\ Tools
/AvrAssembler2
35 DEFS
= $(ASPATH
)/Appnotes
37 ifeq "$(OS)" "Windows_NT"
44 ifeq ($(PLATFORM
),Linux
)
48 AS
= $(WINE
) $(ASPATH
)/avrasm2.exe
49 ASFLAGS
= -I
$(DEFS
) $(CDEFS
)
51 # Programming support using avrdude. Settings and variables.
53 AVRDUDE_PROGRAMMER
= dragon_isp
56 AVRDUDE_WRITE_FLASH
= -U flash
:w
:$(TARGET
).hex
57 AVRDUDE_WRITE_EEPROM
= -U eeprom
:w
:$(TARGET
).eep
60 # Uncomment the following if you want avrdude's erase cycle counter.
61 # Note that this counter needs to be initialized first using -Yn,
63 #AVRDUDE_ERASE_COUNTER = -y
65 # Uncomment the following if you do /not/ wish a verification to be
66 # performed after programming the device.
67 #AVRDUDE_NO_VERIFY = -V
69 # Increase verbosity level. Please use this when submitting bug
70 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
71 # to submit bug reports.
72 #AVRDUDE_VERBOSE = -v -v
74 AVRDUDE_BASIC
= -p
$(MCU
) -P
$(AVRDUDE_PORT
) -c
$(AVRDUDE_PROGRAMMER
)
75 AVRDUDE_FLAGS
= $(AVRDUDE_BASIC
) $(AVRDUDE_NO_VERIFY
) $(AVRDUDE_VERBOSE
) $(AVRDUDE_ERASE_COUNTER
)
82 # Define all listing files.
83 #LST = $(ASRC:.asm=.lst)
85 # Combine all necessary flags and optional flags.
86 # Add target processor to flags.
87 ALL_ASFLAGS
= $(ASFLAGS
)
89 .PHONY
: all hex eep lst map program flash eeprom
tags clean
94 hex
: $(TARGET
).hex
$(ASRC
)
95 eep
: $(TARGET
).eep
$(ASRC
)
96 lst
: $(TARGET
).lst
$(ASRC
)
97 map
: $(TARGET
).map
$(ASRC
)
100 # Program the device.
101 program
: $(TARGET
).hex
$(TARGET
).eep
102 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
) $(AVRDUDE_WRITE_EEPROM
)
105 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
)
107 eeprom
: $(TARGET
).hex
$(TARGET
).eep
108 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_EEPROM
)
111 $(TARGET
).hex
: $(ASRC
)
112 $(TARGET
).eep
: $(ASRC
)
113 $(TARGET
).lst
: $(ASRC
)
114 $(TARGET
).map
: $(ASRC
)
116 #.SUFFIXES: .hex .eep .lst
120 $(AS
) $(ALL_ASFLAGS
) -fI
-o
$@
$<
123 @
$(AS
) $(ALL_ASFLAGS
) -v0
-f-
-l
$@
$<
126 $(AS
) $(ALL_ASFLAGS
) -v0
-f-
-m
$@
$<
132 @svnrev
-osvnrev.inc
$^
134 # Target: clean project.
136 $(REMOVE
) $(TARGET
).hex
$(TARGET
).eep
$(TARGET
).obj
$(TARGET
).map
$(TARGET
).lst