--- Makefile.orig Thu Aug 21 02:17:10 1997 +++ Makefile Fri Mar 23 14:43:41 2001 @@ -7,15 +7,41 @@ # and runs some tests of collector and cords. Does not add cords or # c++ interface to gc.a # cord/de - builds dumb editor based on cords. -CC=cc -CXX=CC +#CC=cc +#CXX=CC AS=as # The above doesn't work with gas, which doesn't run cpp. # Define AS as `gcc -c -x assembler-with-cpp' instead. # Under Irix 6, you will have to specify the ABI for as if you specify # it for the C compiler. -CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DSILENT +# We want this to be a drop-in linkable library, hence the -DREDIRECT. +# The new c++-t and c++-nt (test and notest) are because we don't want +# to fill anyone's log with leak messages! - MMCG + +CFLAGS+= -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \ + -DNO_EXECUTE_PERMISSION -DSILENT -DREDIRECT_MALLOC=GC_malloc + +LEAKFLAGS=$(CFLAGS) -DFIND_LEAK + +all: gc.a gctest + +OpenBSD-pkg-all: obsd-libgc.a obsd-libleak.a + +obsd-libgc.a: + make CFLAGS="$(CFLAGS)" clean c++-t + mv gc.a obsd-libgc.a + +obsd-libleak.a: + make CFLAGS="$(LEAKFLAGS)" clean c++-nt + mv gc.a obsd-libleak.a + +OpenBSD-pkg-install: OpenBSD-pkg-all + ${CP} obsd-libgc.a libgc.a + ${CP} obsd-libleak.a libleak.a + ${INSTALL_DATA} libleak.a libgc.a ${PREFIX}/lib + ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include + ${INSTALL_MAN} gc.man ${PREFIX}/man/man3/gc.3 # Setjmp_test may yield overly optimistic results when compiled # without optimization. @@ -100,7 +126,6 @@ -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS # Flags for building libgc.a -- the last two are required. -CXXFLAGS= $(CFLAGS) AR= ar RANLIB= ranlib @@ -162,8 +187,6 @@ # not time-critical anyway. # Set SPECIALCFLAGS to -q nodirect_code on Encore. -all: gc.a gctest - pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h config.h mach_dep.o $(SRCS) make -f PCR-Makefile depend make -f PCR-Makefile @@ -210,13 +233,18 @@ ./if_mach HP_PA "" $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs` +c++-t: c++ + ./test_cpp 1 + +c++-nt: c++ + @echo "Use ./test_cpp 1 to test the leak library" + c++: gc_cpp.o $(srcdir)/gc_cpp.h test_cpp rm -f on_sparc_sunos5 ./if_mach SPARC SUNOS5 touch on_sparc_sunos5 ./if_mach SPARC SUNOS5 $(AR) rus gc.a gc_cpp.o ./if_not_there on_sparc_sunos5 $(AR) ru gc.a gc_cpp.o ./if_not_there on_sparc_sunos5 $(RANLIB) gc.a || cat /dev/null - ./test_cpp 1 echo > c++ dyn_load_sunos53.o: dyn_load.c