CPP = /cpp/cpp -DAMIGA
MAKE = lmk  # BSD doesn't have it as a default.
#Note: an alternative is  CPP = /lib/cpp

all: xmakefile doall

doall:
	$(MAKE) $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} all

#This is used in making a distribution.
#Do not use it on development directories!
distclean:
	-delete force paths.h config.h emacs-* temacs xemacs xmakefile \
   *! @* *.o

clean:
	-delete force temacs xemacs xmakefile @* *.o

xemacs: xmakefile doxemacs

doxemacs:
	$(MAKE) $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} xemacs

temacs: xmakefile dotemacs

dotemacs:
	$(MAKE) $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} temacs

demacs: xmakefile dodemacs

dodemacs:
	$(MAKE) $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} demacs

# If you have a problem with cc -E here, changing
# the definition of CPP above may fix it.
xmakefile: ymakefile config.h dostrip
	-delete force xmakefile
	${CPP} ymakefile > t:ymkf
	dostrip <t:ymkf >xmakefile

dostrip: dostrip.c
	lc -L dostrip

tags:
	etags [a-z]*.h [a-z]*.c /lisp/[a-z]*.el
