# Buildtemplate for cc68 (Front end for the 68000 C compiler)

VPATH	= ../mi

#ifdef UNIX
INCLDEFS='-DPROD_M68K_INCLUDE="-I$(PRODUCTION_VSYS)/include/m68k"' \
	 '-DPROD_MI_INCLUDE="-I$(PRODUCTION_VSYS)/include/mi"' \
	 '-DEXP_M68K_INCLUDE="-I$(EXPERIMENTAL_VSYS)/include/m68k"' \
	 '-DEXP_MI_INCLUDE="-I$(EXPERIMENTAL_VSYS)/include/mi"'
#else
INCLDEFS='-DPROD_M68K_INCLUDE="-I[V]include/m68k"' \
	 '-DPROD_MI_INCLUDE="-I[V]include/mi"' \
	 '-DEXP_M68K_INCLUDE="-I[xV]include/m68k"' \
	 '-DEXP_MI_INCLUDE="-I[xV]include/mi"'
#endif UNIX
# The single and double quotes are needed.  The single quotes are stripped by
#   the V exec routines or the Unix sh, leaving the double quotes intact.

all: cc68.$(MACHINE)

cc68.$(MACHINE): cc68.c
	$(CC) $(INCLDEFS) $(MIFLAGS) $(SPECINCLUDES) $(INCLUDES) \
		$(MDFLAGS) $(LIBRARIES) -o $@ $<

# Do we need to do anything intelligent about cc68's dependencies on .h files?

install: cc68.$(MACHINE)
#ifdef UNIX
	rcp $< $(UNIXDESTDIR)/cc68
#else
	$(NETINSTALL) -p $< $(VSYS)/bin
#endif

clean:
	rm -f cc68.$(MACHINE) *.b *.o *BAK *CKP

relink:
	rm -f cc68.$(MACHINE)

# What are dll and dlx doing in this directory?  Can we junk them, since they
#   appear to be relics from the early days of Sun-1 development?
# And, what's lorder68.sh doing here?  It also lives in, and is installed from,
#   the directory that contains ld68.
