Changeset View
Changeset View
Standalone View
Standalone View
devel/ElectricFence/files/patch-Makefile
--- Makefile.orig Wed Apr 14 03:22:49 1999 | --- Makefile.orig 1999-04-13 17:22:49 UTC | ||||
+++ Makefile Sun Oct 22 14:27:23 2006 | +++ Makefile | ||||
@@ -1,8 +1,14 @@ | @@ -1,8 +1,14 @@ | ||||
PIC= -fPIC | PIC= -fPIC | ||||
-CFLAGS= -g -DUSE_SEMAPHORE $(PIC) | -CFLAGS= -g -DUSE_SEMAPHORE $(PIC) | ||||
-LIBS= -lpthread | -LIBS= -lpthread | ||||
+#CFLAGS= -g -DUSE_SEMAPHORE $(PIC) | +#CFLAGS= -g -DUSE_SEMAPHORE $(PIC) | ||||
+CFLAGS+= -g $(PIC) | +CFLAGS+= -g $(PIC) | ||||
+.if ${MACHINE_ARCH} == "i386" && ${OSVERSION} < 700003 || (${MACHINE_ARCH} == "amd64" && ${OSVERSION} < 700003) || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" | +.if ${MACHINE_ARCH} == "sparc64" | ||||
+CFLAGS+= -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS | +CFLAGS+= -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS | ||||
+.endif | +.endif | ||||
+#CFLAGS+= -pthread | +#CFLAGS+= -pthread | ||||
+# for FreeBSD comment out the below as this is not how we do pthreads. | +# for FreeBSD comment out the below as this is not how we do pthreads. | ||||
+#LIB_PTHREADS= -lpthread -lc | +#LIB_PTHREADS= -lpthread -lc | ||||
-prefix=/usr | -prefix=/usr | ||||
+prefix=$(PREFIX) | +prefix=$(PREFIX) | ||||
BIN_INSTALL_DIR= $(prefix)/bin | BIN_INSTALL_DIR= $(prefix)/bin | ||||
LIB_INSTALL_DIR= $(prefix)/lib | LIB_INSTALL_DIR= $(prefix)/lib | ||||
MAN_INSTALL_DIR= $(prefix)/man/man3 | MAN_INSTALL_DIR= $(prefix)/man/man3 | ||||
@@ -17,14 +23,18 @@ | @@ -17,14 +23,18 @@ PACKAGE_SOURCE= README efence.3 Makefile efence.h \ | ||||
OBJECTS= efence.o page.o print.o | OBJECTS= efence.o page.o print.o | ||||
all: libefence.a libefence.so.0.0 tstheap eftest | all: libefence.a libefence.so.0.0 tstheap eftest | ||||
- @ echo | - @ echo | ||||
- @ echo "Testing Electric Fence." | - @ echo "Testing Electric Fence." | ||||
- @ echo "After the last test, it should print that the test has PASSED." | - @ echo "After the last test, it should print that the test has PASSED." | ||||
- ./eftest | - ./eftest | ||||
- ./tstheap 3072 | - ./tstheap 3072 | ||||
Show All 10 Lines | |||||
+# EF_PROTECT_BELOW= && EF_PROTECT_FREE= && EF_ALIGNMENT= && ./eftest | +# EF_PROTECT_BELOW= && EF_PROTECT_FREE= && EF_ALIGNMENT= && ./eftest | ||||
+# ./tstheap 3072 | +# ./tstheap 3072 | ||||
+# @ echo | +# @ echo | ||||
+# @ echo "Electric Fence confidence test PASSED." | +# @ echo "Electric Fence confidence test PASSED." | ||||
+# @ echo | +# @ echo | ||||
install: libefence.a efence.3 libefence.so.0.0 | install: libefence.a efence.3 libefence.so.0.0 | ||||
$(INSTALL) -m 755 ef.sh $(BIN_INSTALL_DIR)/ef | $(INSTALL) -m 755 ef.sh $(BIN_INSTALL_DIR)/ef | ||||
@@ -54,16 +64,16 @@ | @@ -54,16 +64,16 @@ libefence.a: $(OBJECTS) | ||||
$(AR) crv libefence.a $(OBJECTS) | $(AR) crv libefence.a $(OBJECTS) | ||||
libefence.so.0.0: $(OBJECTS) | libefence.so.0.0: $(OBJECTS) | ||||
- gcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ | - gcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ | ||||
- $(OBJECTS) -lpthread -lc | - $(OBJECTS) -lpthread -lc | ||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ | + $(CC) $(CFLAGS) -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \ | ||||
+ $(OBJECTS) $(LIB_PTHREADS) | + $(OBJECTS) $(LIB_PTHREADS) | ||||
Show All 12 Lines |