1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
$NetBSD: patch-aa,v 1.4 1999/09/24 16:42:06 jlam Exp $
--- Makefile.orig Sat Sep 11 08:49:18 1999
+++ Makefile Tue Sep 21 02:41:39 1999
@@ -9,14 +9,33 @@
# cord/de - builds dumb editor based on cords.
ABI_FLAG=
CC=cc $(ABI_FLAG)
-CXX=CC $(ABI_FLAG)
-AS=as $(ABI_FLAG)
+CXX=c++ $(ABI_FLAG)
+AS=gcc -c -x assembler-with-cpp $(ABI_FLAG)
# 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 (-o32, -n32, or -64)
# if you use something other than the default ABI on your machine.
CFLAGS= -O -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DSILENT
+
+LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
+
+BSD-pkg-all: bsd-libgc.a bsd-libleak.a
+
+bsd-libgc.a:
+ make CFLAGS="$(CFLAGS)" clean c++-t
+ mv gc.a bsd-libgc.a
+
+bsd-libleak.a:
+ make CFLAGS="$(LEAKFLAGS)" clean c++-nt
+ mv gc.a bsd-libleak.a
+
+BSD-pkg-install: BSD-pkg-all
+ ${CP} bsd-libgc.a libgc.a
+ ${CP} bsd-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
# For dynamic library builds, it may be necessary to add flags to generate
# PIC code, e.g. -fPIC on Linux.
@@ -202,8 +221,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 gcconfig.h mach_dep.o $(SRCS)
make -f PCR-Makefile depend
make -f PCR-Makefile
@@ -245,6 +262,12 @@
./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 dont_ar_4
./if_mach SPARC SUNOS5 touch dont_ar_4
@@ -253,7 +276,6 @@
./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
- ./test_cpp 1
echo > c++
dyn_load_sunos53.o: dyn_load.c
|