mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-08 23:06:56 +00:00
81a9216d91
(we only have two arch's, why can't we keep them better in sync with each other ABI-wise?)
89 lines
2.7 KiB
Plaintext
89 lines
2.7 KiB
Plaintext
--- Makefile.orig Fri Oct 29 15:18:48 1999
|
|
+++ Makefile Tue Jul 18 21:10:50 2000
|
|
@@ -8,15 +8,42 @@
|
|
# c++ interface to gc.a
|
|
# cord/de - builds dumb editor based on cords.
|
|
ABI_FLAG=
|
|
-CC=cc $(ABI_FLAG)
|
|
-CXX=g++ $(ABI_FLAG)
|
|
-AS=as $(ABI_FLAG)
|
|
+CC+= $(ABI_FLAG)
|
|
+CXX+= $(ABI_FLAG)
|
|
+AS=cc -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
|
|
+# 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
|
|
+
|
|
+GCFLAGS= -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
|
|
+ -DNO_EXECUTE_PERMISSION -DSILENT
|
|
+CFLAGS+= $(GCFLAGS)
|
|
+
|
|
+LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
|
|
+
|
|
+all: gc.a gctest
|
|
+
|
|
+FreeBSD-pkg-all: fbsd-libgc.a fbsd-libleak.a
|
|
+
|
|
+fbsd-libgc.a:
|
|
+ make CFLAGS="$(CFLAGS)" clean c++-t
|
|
+ mv gc.a fbsd-libgc.a
|
|
+
|
|
+fbsd-libleak.a:
|
|
+ make CFLAGS="$(LEAKFLAGS)" clean c++-nt
|
|
+ mv gc.a fbsd-libleak.a
|
|
+
|
|
+FreeBSD-pkg-install: FreeBSD-pkg-all
|
|
+ ${CP} fbsd-libgc.a libgc.a
|
|
+ ${CP} fbsd-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.
|
|
@@ -140,7 +167,7 @@
|
|
-DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
|
|
# Flags for building libgc.a -- the last two are required.
|
|
|
|
-CXXFLAGS= $(CFLAGS)
|
|
+CXXFLAGS+= $(GCFLAGS)
|
|
AR= ar
|
|
RANLIB= ranlib
|
|
|
|
@@ -204,8 +231,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
|
|
@@ -247,6 +272,12 @@
|
|
./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
|
|
./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
|
|
@@ -255,7 +286,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
|