SHELL=/bin/sh
# An example Makefile for a multi-directory system.

OBJ=	../dir1/program1.o ../dir1/program2.o  \
	../dir2/X/program3.o ../dir2/X/program4.o  \
	../includer/includer.o \
	master.o program1.o program2.o

all:     
	cd ../dir1; make "CC=$(CC)"
	cd ../dir2/X; make "CC=$(CC)"
	cd ../includer; make "CC=$(CC)"
	$(CC) -c master.c program1.c program2.c
	$(CC) -o system $(OBJ)

# For info about the "echo pwd" garbage, see the 'run' script.
gct:
	gct-init;
	$(MAKE) all "CC=gct -test-dir `echo pwd | sh` " 

clean:
	@-../../do-clean
	@-cd ../dir1; ../../do-clean
	@-cd ../includer; ../../do-clean
	@-cd ../dir2/X; ../../../do-clean
	@-/bin/rm -f system	
