CC		= cc
CCflags		= -c -fa -Ospace -depend !Depend -IC: -I^.lib. -throwback $(OPTS)
AS		= objasm
ASflags		= -throwback -depend !Depend -pd "APCS32 SETL {TRUE}"
Link		= link
Linkflags	= -o $@ -nounused -rescan

OPTS =	-DHAVE_CONFIG_H -Dlint

#LIBS =	^.lib.o.gststubs ^.lib.o.libgnu ^.lib.o.mdwopt
LIBS =	C:o.stubs ^.lib.o.libgnu ^.lib.o.mdwopt

DOLINK = $(link) $(linkflags) o.$@ $(LIBS)

# Pseudo targets to suppress messages and setup .c.o template system

.SILENT:
.SUFFIXES:	.c .s .o

bin2c_Objs =	o.bin2c

# Main target

All:		bin2c

bin2c:		$(bin2c_Objs) $(LIBS) h.bin2c
		$(link) $(linkflags) $(bin2c_Objs) $(LIBS)

Clean:
		ifthere o.* then wipe o.* ~cfr~v
		remove h.bin2c
		remove mkbin2c
		remove bin2c

# Templates

.c.o:;		$(cc) $(CCflags) $< -o $@
.s.o:;		$(as) $(ASflags) $< -o $@

# Static dependencies:

o.bin2c:	c.bin2c
o.mkbin2c:	c.mkbin2c

mkbin2c:	o.mkbin2c ^.lib.o.gststubs
		$(link) $(linkflags) o.mkbin2c ^.lib.o.gststubs

h.bin2c:	mkbin2c
		cdir h
		<Prefix$Dir>.mkbin2c > h.bin2c

# Dynamic dependencies:
