# Makefile for H8/300 cross compilation of C and assembler programs. # Path to C compiler (gcc), assembler (as) and linker (ld). INSTDIR = /users/legolab/RCX BINDIR = $(INSTDIR)/`uname -s`/h8300-hitachi-hms/bin/ CC = $(BINDIR)gcc AS = $(BINDIR)as LD = $(BINDIR)ld RCXDOWNLOAD = $(INSTDIR)/`uname -s`/bin/RCX_Download # Options for C compiler and linker. CFLAGS = -O2 -Wall -I$(INSTDIR)/include LFLAGS = -T$(INSTDIR)/Manual.dir/rcx.lds # Entries. # $< and $@ expands to the actual file name that matches the # right hand side and the left hand side of : (colon). %.o: %.c $(CC) $(CFLAGS) -c $< %.o: %.s $(AS) $< -o $@ %.s: %.c $(CC) -S $(CFLAGS) $< %.srec: %.o $(LD) $(LFLAGS) -o $@ $< %.send: %.srec $(RCXDOWNLOAD) $<