#
#   Type Test program makefile for GNU
#
#	G.Ellison

# macro
CC = shc
ASM = asmsh
CNV = dwfcnv
LD = lnk

# option
CCFLAGS = -sub=shc.sub
LDFLAGS = -sub=lnk.sub
CNVFLAGS = -sysrof=
ASMFLAGS = -debug=dwarf -endian=little -cpu=sh4

# source_program
SRCS_SHC = ChanEcho.c
ARCS_SHC = crt0.asm biostrap.asm

COBJS_SHC = $(SRCS_SHC:.c=.o)
AOBJS_SHC = $(ARCS_SHC:.asm=.obj)

TARGET   = hello.elf
MAKEFILE = makefile

$(TARGET) : $(COBJS_SHC) $(AOBJS_SHC) $(MAKEFILE)
	$(LD) $(LDFLAGS)


.c.o:
	$(CC) $(CCFLAGS) $*.c
#	$(ASM) $*.src $(ASMFLAGS)
	$(CNV) $(CNVFLAGS)$*.o $*.obj


.asm.obj:
	$(ASM) $*.asm $(ASMFLAGS)
#	$(CNV) $(CNVFLAGS)$*.o $*.obj

