#Mon Nov  9 08:58:06 CST 1987 Patrick Powell
#
# Makefile for the LPR software, top level
# The source is in src, filters, utilities;
# the DEBUG flag will make a debug version; check that you have
# set this flag correctly before you start doing anything.


#DEBUG = -DDEBUG
THINGS= cpr print

DIRS = include $(THINGS)
FILES = Makefile README
BIN	= /usr/local/new/bin
LIB	= /usr/local/new/lib

help:
	@echo "all:     build everything from source"
	@echo "clean:   delete all things built from source"
	@echo "install: install everything built from source"
	@echo "  Install man pages by hand, see man/Makefile"


all:
	for thing in $(THINGS); do \
		echo ----- building $$thing -----; \
		(cd $$thing; \
			$(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) all;) \
	done


clean:
	for thing in $(THINGS); do \
		echo ----- clean $$thing -----; \
		(cd $$thing; \
			$(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) clean;) \
	done


install:
	for thing in $(THINGS); do \
		echo ----- installing $$thing -----; \
		(cd $$thing; \
			$(MAKE) BIN=$(BIN) LIB=$(LIB) DEBUG=$(DEBUG) $(MFLAGS) install;) \
	done

