#
# $Id: makefile,v 1.3 2002/04/01 12:58:14 cjh Exp $
#
# Main makefile for db11, a 68HC11 downloader/terminal program
#
# Copyright (c) 1996-2000, Clifford Heath.
#
# This program may be used for any commercial or noncommercial purpose
# without charge, but acknowledgement of authorship and this copyright
# message must be retained in any copies.
#

INST_DIR	=	inst

# Make everything and install it in $(INST_DIR):
all:	install_dir install_db11 install_talkers install_scripts install_tests

# Make the source package:
package:
	cd ..; tar czf db11/db11.tgz `sed 's:^.:db11/&:' < db11/MANIFEST`

install_dir:
	@-test -d $(INST_DIR) || mkdir inst

install_db11:
	cd src; $(MAKE) COPT=$(COPT)
	mv src/db11 $(INST_DIR)
	mv src/db11.man $(INST_DIR)

install_talkers:
	cd talker; $(MAKE)
	mv talker/*.s19 $(INST_DIR)

install_scripts:
	cp -f scripts/*.db11 $(INST_DIR)

install_tests:
	cd hello; $(MAKE)
	cp hello/*.s19 inst

clean:
	cd src; $(MAKE) clean
	cd talker; $(MAKE) clean
	cd hello; $(MAKE) clean
