# Copyright (c) 1993 Xerox Corporation. All rights reserved. # include ../config/config.mk # # locations of object files # INSTALL_LIB = ../lib INSTALL_BIN = ../bin # # compilation flags, etc. # CPPFLAGS = $(INCLUDE) $(CONFIG_CPPFLAGS) \ -DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR CFLAGS =-c $(CONFIG_CFLAGS) ASPPFLAGS = $(INCLUDE) $(CONFIG_ASPPFLAGS) \ -DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR -DASM ASFLAGS = $(CONFIG_ASFLAGS) LDRFLAGS = $(CONFIG_LDRFLAGS) LDFLAGS = $(CONFIG_LDFLAGS) # # standard commands and default rules # INSTALL = cp -p .s.o: $(ASPP) $(ASPPFLAGS) $< > tmp.s ; $(AS) $(ASFLAGS) tmp.s -o $@ ; \ rm -f tmp.s .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ # # # # # BEGIN PACKAGE-SPECIFIC PART # # # # # # Default target # # Fix to point to local pcr installation directory. # PCRDIR= /project/ppcr/dev PCRDIR= .. CFLAGS= -DPCR $(CONFIG_CFLAGS) # 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 all: gc.o 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 malloc.o stubborn.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 malloc.c stubborn.c SHELL= /bin/sh gcpcr: gc.o test.o $(PCRDIR)/base/pcr.o $(PCRDIR)/base/PCR_BaseMain.o $(CC) -o gcpcr $(PCRDIR)/base/pcr.o $(PCRDIR)/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. # old-depend: $(CSRCS) rm -f makedep eddep ; \ gcc -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 makedep: $(CSRCS) rm -f makedep -for x in $(CSRCS) END ; \ do if [ $$x != END ]; then \ $(CPP) -M $(CPPFLAGS) $$x \ | sed -e '/:$$/d' >> makedep ; \ fi ; \ done depend: makedep echo '/^# DO NOT DELETE THIS LINE/,$$c' > eddep echo '# DO NOT DELETE THIS LINE' >> eddep echo '# Make depend depends on it' >> eddep echo '.' >> eddep echo '$$r makedep' >> eddep echo 'w' >> eddep rm -f PCR-Makefile.bak mv PCR-Makefile PCR-Makefile.bak cp PCR-Makefile.bak PCR-Makefile chmod u+w PCR-Makefile ex - PCR-Makefile < eddep -if [ ! -w PCR-Makefile.bak ] ; then chmod u-w PCR-Makefile ; fi rm -f eddep makedep # DO NOT DELETE THIS LINE # Make depend depends on it reclaim.o : reclaim.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h allochblk.o : allochblk.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h misc.o : misc.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h ../posix/signal.h ../sig/PCR_Sig.h \ ../config/PCR_OS.h ../sig/PCR_SigTypes.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/time.h \ ../host/time.h alloc.o : alloc.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h ../posix/signal.h ../sig/PCR_Sig.h \ ../config/PCR_OS.h ../sig/PCR_SigTypes.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/time.h \ ../host/time.h mach_dep.o : mach_dep.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h ../ansi/stdio.h \ ../config/PCR_StdTypes.h /import/gnu/lib/gcc-include/stdarg.h \ ../posix/setjmp.h ../config/PCR_Arch.h os_dep.o : os_dep.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h ../ansi/stdio.h \ ../config/PCR_StdTypes.h /import/gnu/lib/gcc-include/stdarg.h \ ../posix/signal.h ../sig/PCR_Sig.h ../config/PCR_OS.h ../sig/PCR_SigTypes.h \ /usr/include/sys/mman.h /usr/include/sys/syscall.h mark_roots.o : mark_roots.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h headers.o : headers.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h mark.o : mark.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h obj_map.o : obj_map.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h pcr_interface.o : pcr_interface.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h black_list.o : black_list.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h finalize.o : finalize.c gc.h ../posix/stddef.h ../posix/host/stddef.h \ gc_private.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h new_hblk.o : new_hblk.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h real_malloc.o : real_malloc.c dynamic_load.o : dynamic_load.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h ../ansi/stdio.h \ ../config/PCR_StdTypes.h /import/gnu/lib/gcc-include/stdarg.h \ /usr/include/dlfcn.h /usr/include/link.h /usr/include/a.out.h \ /usr/include/machine/a.out.h /usr/include/sys/exec.h debug_malloc.o : debug_malloc.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h malloc.o : malloc.c ../ansi/stdio.h ../config/PCR_StdTypes.h \ /import/gnu/lib/gcc-include/stdarg.h ../posix/stddef.h \ ../posix/host/stddef.h gc_private.h gc.h config.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h stubborn.o : stubborn.c gc_private.h gc.h ../posix/stddef.h \ ../posix/host/stddef.h config.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h gc_headers.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/time.h ../host/time.h