INCLUDE = /usr/local/h8300-elf/include LIB = /usr/local/h8300-elf/lib/h8300h CMDDIR = /usr/local/bin/ GCC = $(CMDDIR)h8300-elf-gcc OBJCPY = $(CMDDIR)h8300-elf-objcopy TARGET = hello SRC = $(TARGET).c ramcrt0.S LDSCRIPT = 3069monitor.x MAP = $(TARGET).map CFLAGS = -Wall -O2 -ansi -mh -mint32 -gdwarf-2\ -I$(INCLUDE) LDFLAGS = -nostdlib -nostartfiles -nodefaultlibs -mrelax -lc -lgcc\ -T $(LDSCRIPT) -Wl,-Map,$(MAP) -Wl,-static -L$(LIB) all : $(TARGET).mot $(TARGET).abs @echo COMPLETED. $(TARGET).mot : $(TARGET).elf $(OBJCPY) -O srec $(TARGET).elf $(TARGET).mot $(TARGET).abs : $(TARGET).elf cp $(TARGET).elf $(TARGET).abs $(TARGET).elf : $(SRC) 3069monitor.x ramcrt0.S $(GCC) $(SRC) $(CFLAGS) $(LDFLAGS) -o $(TARGET).elf clean: rm -f *.mot *.elf *.abs *.o