# define macros for ease of editing and clarity CFLAGS_Macro = -Wall LINKER_Macro = -Xlinker -Ttext -Xlinker 80140000 TARGET_Macro = main OBJECT_Macro = main.o # define dependancy rules for creation of compiled files all: $(TARGET_Macro) $(TARGET_Macro): $(OBJECT_Macro) gcc $(LINKER_Macro) $(OBJECT_Macro) -o $(TARGET_Macro) strip $@ # tell make program how to create object files (.o) # from c files (.c) .c.o: gcc $(CFLAGS) -funsigned -char -c $< # delete correct files when command is entered clean: del $(TARGET_Macro) del *.o