]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/avr/Makefile
* ipl.mac added
[avrcpm.git] / avrcpm / avr / Makefile
index 1d0d5c31ba84e6cf9f3a1ff9741899894801464f..c6f2b3547a0b84fb0bb68f3a2368816b569ad6e9 100644 (file)
@@ -4,16 +4,29 @@
 
 #MCU = atmega8
 MCU = atmega328P
-#F_CPU = 24576000
 F_CPU = 20000000
-BAUD = 115200
-DRAM_DQ_ORDER = 1
+#BAUD = 19200
+BAUD = 57600
+#BAUD = 115200
 
-TARGET = z80
-ASRC = z80.asm
+DRAM_8BIT = 1
+
+TARGET = avrcpm
+ASRC  = avrcpm.asm 
+
+ASRC += config.inc macros.inc init.asm dram-refresh.asm timer.asm utils.asm 
+ASRC += mmc.asm mmc-old.asm virt_ports.asm
+ASRC += dsk_cpm.asm dsk_fat16.asm dsk_fsys.asm dsk_mgr.asm dsk_ram.asm 
+ASRC += 8080int.asm 8080int-jmp.asm 8080int-t3.asm 8080int-t3-jmp.asm 
+
+ifneq ($(DRAM_8BIT),0)
+  ASRC += dram-8bit.inc dram-8bit.asm sw-uart.asm 
+else
+  ASRC += dram-4bit.inc dram-4bit.asm hw-uart.asm 
+endif
 
 # Place -D or -U options here
-CDEFS = -DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -D$(MCU) -DDRAM_DQ_ORDER=$(DRAM_DQ_ORDER)
+CDEFS = -DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -D$(MCU) -DDRAM_8BIT=$(DRAM_8BIT)
 
 WINEPATH = C:/Programme/Atmel/AVR\ Tools/AvrAssembler2
 DEFS = $(WINEPATH)/Appnotes
@@ -53,19 +66,21 @@ MV = mv -f
 
 
 # Define all listing files.
-LST = $(ASRC:.asm=.lst)
+#LST = $(ASRC:.asm=.lst)
 
 # Combine all necessary flags and optional flags.
 # Add target processor to flags.
 ALL_ASFLAGS =  $(ASFLAGS)
 
+.PHONY:        all hex eep lst map program flash eeprom tags clean
+
 # Default target.
 all: hex lst
 
-hex: $(TARGET).hex
-eep: $(TARGET).eep
-lst: $(TARGET).lst
-map: $(TARGET).map
+hex: $(TARGET).hex $(ASRC)
+eep: $(TARGET).eep $(ASRC)
+lst: $(TARGET).lst $(ASRC)
+map: $(TARGET).map $(ASRC)
 
 
 # Program the device.  
@@ -79,8 +94,13 @@ eeprom: $(TARGET).hex $(TARGET).eep
        $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_EEPROM)
 
 
+$(TARGET).hex: $(ASRC)
+$(TARGET).eep: $(ASRC)
+$(TARGET).lst: $(ASRC)
+$(TARGET).map: $(ASRC)
 
-.SUFFIXES: .hex .eep .lst
+#.SUFFIXES: .hex .eep .lst
+.SUFFIXES:
 
 %.hex: %.asm
        $(AS) $(ALL_ASFLAGS) -fI -o $@ $<
@@ -100,6 +120,3 @@ tags: $(SRC) $(ASRC)
 clean:
        $(REMOVE) $(TARGET).hex $(TARGET).eep $(TARGET).obj $(TARGET).map $(TARGET).lst
 
-
-.PHONY:        all hex eep lst map program flash eeprom tags clean
-