2000-08-27 01:34:16 +00:00
|
|
|
--- Makefile.orig Sat Aug 26 18:29:55 2000
|
|
|
|
+++ Makefile Sat Aug 26 18:31:42 2000
|
|
|
|
@@ -1,8 +1,14 @@
|
|
|
|
PIC= -fPIC
|
|
|
|
-CFLAGS= -g -DUSE_SEMAPHORE $(PIC)
|
|
|
|
-LIBS= -lpthread
|
|
|
|
+#CFLAGS= -g -DUSE_SEMAPHORE $(PIC)
|
|
|
|
+CFLAGS+= -g $(PIC)
|
1999-09-25 03:55:53 +00:00
|
|
|
+.if ${MACHINE_ARCH} == "i386"
|
|
|
|
+CFLAGS+= -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
|
|
|
|
+.endif
|
2000-08-27 01:34:16 +00:00
|
|
|
+#CFLAGS+= -pthread
|
|
|
|
+# for FreeBSD comment out the below as this is not how we do pthreads.
|
|
|
|
+#LIB_PTHREADS= -lpthread -lc
|
|
|
|
|
|
|
|
-prefix=/usr
|
|
|
|
+prefix=$(PREFIX)
|
|
|
|
BIN_INSTALL_DIR= $(prefix)/bin
|
|
|
|
LIB_INSTALL_DIR= $(prefix)/lib
|
|
|
|
MAN_INSTALL_DIR= $(prefix)/man/man3
|
|
|
|
@@ -54,16 +60,16 @@
|
|
|
|
$(AR) crv libefence.a $(OBJECTS)
|
|
|
|
|
|
|
|
libefence.so.0.0: $(OBJECTS)
|
|
|
|
- gcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
|
|
|
|
- $(OBJECTS) -lpthread -lc
|
|
|
|
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
|
|
|
|
+ $(OBJECTS) $(LIB_PTHREADS)
|
|
|
|
|
|
|
|
tstheap: libefence.a tstheap.o
|
|
|
|
- rm -f tstheap
|
|
|
|
- $(CC) $(CFLAGS) tstheap.o libefence.a -o tstheap $(LIBS)
|
|
|
|
+ $(CC) $(CFLAGS) tstheap.o libefence.a -o tstheap $(LIB_PTHREADS)
|
|
|
|
|
|
|
|
eftest: libefence.a eftest.o
|
|
|
|
- rm -f eftest
|
|
|
|
- $(CC) $(CFLAGS) eftest.o libefence.a -o eftest $(LIBS)
|
|
|
|
+ $(CC) $(CFLAGS) eftest.o libefence.a -o eftest $(LIB_PTHREADS)
|
|
|
|
|
|
|
|
$(OBJECTS) tstheap.o eftest.o: efence.h
|
1999-09-25 03:55:53 +00:00
|
|
|
|