#	Makefile for Make
#	(c) Copyright 1991 by Ben Eng, All Rights Reserved
#
#	LIST of OPTIONS
#	-DMAXLINE=1024 sets the maximum line length to 1024
#	-DMAXSUFFIX=16 sets the maximum suffix length to 16
#	-DMAXPATHNAME=108 sets the maximum length of a path name to 108
#	-DMAX_MACRONAME=512	to overide internal default of 256
#	-DFNCALLS=0 to disable function calls
#	-DDEBUG=0 to disable the debugging features
#	-gs enables dynamic stack growth
#	-s enables symbolic information
#	MiniMake OPTIONS := -DDEBUG=0 -DFNCALLS=0
#	BigMake  OPTIONS :=
OPTIONS :=
CC := dcc
CFLAGS = -r -ms -proto $(OPTIONS)
LIBS := -lben

CNOBJS := cond.o input.o read.o recipe.o
DHOBJS := main.o depend.o  dumprules.o make.o builtin.o \
	macro.o expand.o fncall.o pattern.o $(CNOBJS)
OBJS = lists.o snode.o param.o touch.o log.o parsing.o $(DHOBJS)

VERS := version.o

all: bmake

.PHONY: all

bmake: $(VERS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(VERS) $(LIBS)
	-delete make.log

$(VERS): $(OBJS)

$(OBJS): make.h
$(DHOBJS): depend.h
$(CNOBJS): cond.h

clean:
	-delete $(OBJS) $(VERS) make.log

install:
	copy bmake sys:bin/make

