#	BSDI makefile,v 1.3 1995/10/11 21:57:26 torek Exp

#
# BSD Makefile for Emacs 19
#
# We translate BSD targets into Emacs targets and
# run gmake -f Makefile on them.
#

# Files built by ${.CURDIR}/configure.
CONFIG=	Makefile \
	config.status \
	lib-src/Makefile \
	lib-src/Makefile.in \
	lwlib/Makefile \
	oldXMenu/Makefile \
	src/Makefile \
	src/Makefile.in \
	src/config.h

all emacs: Makefile
	gmake -f Makefile CFLAGS=-O2 all

obj objdir depend lint:

tags TAGS: Makefile
	gmake -f Makefile TAGS

clean: Makefile
	gmake -f Makefile clean
	rm -f ${.CURDIR}/etc/DOC-19.28.1 ${.CURDIR}/lib-src/y.tab.c \
		${.CURDIR}/src/paths.h

# This is not so great: we may have to configure just to unconfigure.
# But then, GNU software is never pretty.
cleandir: clean unconfigure

unconfigure:
	cd ${.CURDIR}; rm -f ${CONFIG}

install: Makefile
	gmake -f Makefile install

Makefile: configure
	cd ${.CURDIR}; ./configure ${MACHINE}-unknown-bsdi \
		--prefix=/usr/contrib -verbose --with-x-toolkit
