############################################################################### # Makefile for the serial_lcd C version for IAR ## General Flags PROJECT = serial_lcd MCU = tiny2313 TARGET = $(PROJECT).hex CC = /Program Files/IAR Systems/Embedded Workbench 5.0/avr/bin/iccavr.exe LD = /Program Files/IAR Systems/Embedded Workbench 5.0/avr/bin/xlink.exe ## Compile options common for all C compilation units. CFLAGS = --cpu $(MCU) -l $(PROJECT).lst -s9 -e --lock_regs 4 -D ENABLE_BIT_DEFINITIONS ## Linker flags LDFLAGS = -Fubrof9 -xm -xs -xe -xn -xo -f '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/config/lnktiny2313t.xcl' -l $(PROJECT).map -s main LIBS = '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/lib/clib/cl0t.r90' ## Include Directories INCLUDES = -I .. -I . -I '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/inc' ## Objects that must be built in order to link OBJECTS = $(PROJECT).r90 ## Build all: $(TARGET) ## Compile $(PROJECT).r90: ../$(PROJECT).c $(CC) $(INCLUDES) $(CFLAGS) $< ##Link $(TARGET): $(OBJECTS) $(LD) $(LDFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) ## Clean target .PHONY: distclean distclean: clean @rm -f $(TARGET) $(PROJECT).lst $(PROJECT).map .PHONY: clean clean: @rm -f $(OBJECTS)