X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/e63b2f75607905fedf00cfd9fe644b26af715ffd..c748023ede9e7d8bdbf81ce8c8be2a437607a9e4:/avr/Tupfile diff --git a/avr/Tupfile b/avr/Tupfile index 6c40649..78e9744 100644 --- a/avr/Tupfile +++ b/avr/Tupfile @@ -16,6 +16,10 @@ SRC += $(FATFS) $(TOP)/fatfs/src/option/unicode.c #TODO: time lib SRC += ../time/asctime_r.c ../time/gmtime_r.c ../time/mk_gmtime.c SRC += ../time/print_lz.c ../time/isLeap.c +SRC += ../time/time.c ../time/fatfs_time.c +SRC += ../time/system_time.c ../time/set_system_time.c + +ASRC += ../time/system_tick.S SRC_Z = ../z180/hdrom.c @@ -74,17 +78,26 @@ CFLAGS += $(INCLUDES) CPPFLAGS += $(DEFS) +#ASFLAGS += -Wa,-adhlns=$(<:.S=.lst),-gstabs +ASFLAGS += -mmcu=$(MCU_TARGET) -x assembler-with-cpp $(ASFLAGS) + # Linker flags LDFLAGS += -Wl,--gc-sections LDFLAGS += -Wl,--cref +# Assemble: create object files from assembler source files. +#.S.o: +# $(CC) -c $(ALL_ASFLAGS) $< -o $@ + +!as = |> ^ AS %f^ $(CC) $(ASFLAGS) -c %f -o %o |> %B.o !cc = |> ^ CC %f^ $(CC) $(CFLAGS) $(CPPFLAGS) $(CFLAGS_%f) -c %f -o %o |> %B.o !LINK = |> ^ LINK %o^ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-Map=%O.map %f $(LDLIBS) -o %o |> | %O.map !OBJCOPY= |> ^ OBJCOPY %o^ $(OBJCOPY) -Oihex %f %o |> !OBJDUMP= |> ^ OBJDUMP %o^ $(OBJDUMP) -h -S %f > %o |> %O.lss !SIZE = |> ^ SIZE^ $(SIZE) %f |> +: foreach $(ASRC) |> !as |> {objs} : foreach $(SRC) | ../z180/hdrom.h |> !cc |> {objs} : $(SRC_Z) |> !cc -D'const=const __flash' |> {objs}