######################################################################
# Makefile to build Shell 5.10L under Lattice C 5.10
# NOTE: char's are UNSIGNED by default, and the executable's calld 'zsh'

FLAGS  = -ms -v -d3 -cs -rr -O -cu
OBJ=run.o main.o comm1.o comm2.o comm3.o execom.o set.o sub.o globals.o rawcon.o

# -ms = short code optimize     -v  = no stack overflow check
# -d0 = no debug info           -cu = unsigned chars by default
# -cs = one copy per string     -m3 = code for 68030
# -H  = read precompiled header -ph = write precompiled header
# -rr = register arguments       ND = strip debug information

zsh: $(OBJ)
	BLINK lib:cres.o $(OBJ) LIB lib:lcr.lib lib:amiga.lib TO zsh NOICONS ND

shell.syms: shell.h proto.h
	lc -cu -ph -oshell.syms syms.c

main.o: shell.syms
	lc $(FLAGS) -HShell.syms $*.c

$(OBJ): shell.syms
	lc $(FLAGS) -HShell.syms $*.c
