OBJS= alloc.o reclaim.o allochblk.o misc.o mach←dep.o os←dep.o mark←roots.o headers.o mark.o obj←map.o pcr←interface.o black←list.o finalize.o new←hblk.o real←malloc.o dynamic←load.o debug←malloc.o

CSRCS= reclaim.c allochblk.c misc.c alloc.c mach←dep.c os←dep.c mark←roots.c headers.c mark.c obj←map.c pcr←interface.c black←list.c finalize.c new←hblk.c real←malloc.c dynamic←load.c debug←malloc.c

SHELL= /bin/sh

# Fix to point to local pcr installation directory.
PCRDIR= /project/ppcr/v1.5
CC= gcc
CFLAGS= -g -DPCR -I$(PCRDIR) -I$(PCRDIR)/pcr -I$(PCRDIR)/pcr/ansi -I$(PCRDIR)/pcr/posix

# We assume that mach←dep.o has already been built by top level makefile.  It doesn't
# care about pcr vs UNIX, and we don't want to repeat that cruft.

all: gc.o test.o gcpcr

gcpcr: gc.o test.o $(PCRDIR)/pcr/base/pcr.o $(PCRDIR)/pcr/base/PCR←BaseMain.o
	$(CC) -o gcpcr $(PCRDIR)/pcr/base/pcr.o $(PCRDIR)/pcr/base/PCR←BaseMain.o gc.o test.o -ldl

gc.o: $(OBJS)
	-ld -r -o gc.o $(OBJS)

#
# Dependency construction
#
# NOTE: the makefile must include "# DO NOT DELETE THIS LINE" after the
#   last target.  "make depend" will replace everything following that line
#   by a newly-constructed list of dependencies.
#
depend: $(CSRCS)
	rm -f makedep eddep ; \
    $(CC) -M $(CFLAGS) $(CSRCS) \
			| sed -e '/:$$/d' > makedep ; \
    echo '/↑# DO NOT DELETE THIS LINE/+1,$$d' >eddep ; \
	echo '$$r makedep' >>eddep ; \
	echo 'w' >>eddep ; \
	cp PCR-Makefile PCR-Makefile.bak ; \
	ex - PCR-Makefile < eddep ; \
	rm -f eddep makedep
	touch depend
	
# DO NOT DELETE THIS LINE