]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/avr/Makefile
* ipl.mac added
[avrcpm.git] / avrcpm / avr / Makefile
index 9fa980f85d6e41ea88ec156ad5d14d68d0899703..c6f2b3547a0b84fb0bb68f3a2368816b569ad6e9 100644 (file)
@@ -12,7 +12,18 @@ BAUD = 57600
 DRAM_8BIT = 1
 
 TARGET = avrcpm
-ASRC = avrcpm.asm
+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_8BIT=$(DRAM_8BIT)
@@ -55,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.  
@@ -81,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 $@ $<
@@ -102,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
-