2010-11-03 12:37:46 -04:00
|
|
|
$OpenBSD: patch-tests_Makefile,v 1.6 2010/11/03 16:37:46 jasper Exp $
|
2009-03-26 18:09:53 -04:00
|
|
|
|
|
|
|
- Remove GNU make crap that never applied to us anyway.
|
|
|
|
|
2010-11-03 12:37:46 -04:00
|
|
|
--- tests/Makefile.orig Wed Nov 3 17:36:15 2010
|
|
|
|
+++ tests/Makefile Wed Nov 3 17:37:15 2010
|
|
|
|
@@ -19,53 +19,10 @@ CFLAGS += -Wall
|
|
|
|
#CFLAGS += -std=c89
|
2009-06-03 18:43:58 -04:00
|
|
|
CFLAGS += ${EXTRA_CFLAGS}
|
2007-01-11 12:42:21 -05:00
|
|
|
|
2006-06-28 13:22:52 -04:00
|
|
|
-ifeq ($(HASH_DEBUG),1)
|
|
|
|
-CFLAGS += -DHASH_DEBUG=1
|
|
|
|
-endif
|
2007-01-11 12:42:21 -05:00
|
|
|
-
|
2009-03-26 18:09:53 -04:00
|
|
|
-ifeq ($(HASH_PEDANTIC),1)
|
|
|
|
-CFLAGS += -pedantic
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
TEST_TARGET=run_tests
|
|
|
|
TESTS=./do_tests
|
2007-01-11 12:42:21 -05:00
|
|
|
|
2010-11-03 12:37:46 -04:00
|
|
|
MUR_CFLAGS = -DHASH_USING_NO_STRICT_ALIASING -fno-strict-aliasing
|
|
|
|
-# On GNU we use -fno-strict-aliasing when using the Murmurhash
|
|
|
|
-ifneq ($(strip $(shell $(CC) -v 2>&1 |egrep "gcc")),)
|
|
|
|
-ifeq ($(HASH_FUNCTION),"HASH_MUR")
|
|
|
|
- CFLAGS += $(MUR_CFLAGS)
|
|
|
|
-endif
|
|
|
|
-endif
|
|
|
|
-
|
2009-03-26 18:09:53 -04:00
|
|
|
-# Prefer 64-bit compilation on Mac OS X (not necessary, just faster)
|
|
|
|
-ifneq ($(strip $(shell $(CC) -v 2>&1 |egrep "i[0-9]+-apple-darwin")),)
|
|
|
|
- CFLAGS += -m64
|
|
|
|
-endif
|
|
|
|
-
|
2009-06-03 18:43:58 -04:00
|
|
|
-# detect Cygwin
|
2007-01-11 12:42:21 -05:00
|
|
|
-ifneq ($(strip $(shell $(CC) -v 2>&1 |grep "cygwin")),)
|
|
|
|
- TESTS=./do_tests.cygwin
|
|
|
|
-endif
|
2009-03-26 18:09:53 -04:00
|
|
|
-
|
2010-11-03 12:37:46 -04:00
|
|
|
-# detect MinGW
|
2009-03-26 18:09:53 -04:00
|
|
|
-ifneq ($(strip $(shell $(CC) -v 2>&1 |grep "mingw")),)
|
|
|
|
- TEST_TARGET=run_tests_mingw
|
|
|
|
- TESTS=./do_tests.mingw
|
|
|
|
-endif
|
2010-11-03 12:37:46 -04:00
|
|
|
-
|
|
|
|
-#detect Linux (platform specific utilities)
|
|
|
|
-ifneq ($(strip $(shell $(CC) -v 2>&1 |grep "linux")),)
|
|
|
|
- PLAT_UTILS = hashscan sleep_test
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
-#detect FreeBSD (platform specific utilities)
|
|
|
|
-ifeq ($(strip $(shell uname -s)), FreeBSD)
|
|
|
|
- ifeq ($(shell if [ `sysctl -n kern.osreldate` -ge 0801000 ]; then echo "ok"; fi), ok)
|
|
|
|
- PLAT_UTILS = hashscan sleep_test
|
|
|
|
- endif
|
|
|
|
-endif
|
|
|
|
-
|
2009-06-03 18:43:58 -04:00
|
|
|
|
2010-11-03 12:37:46 -04:00
|
|
|
all: $(PROGS) $(UTILS) $(PLAT_UTILS) $(FUNCS) $(SPECIAL_FUNCS) $(TEST_TARGET)
|
2009-03-26 18:09:53 -04:00
|
|
|
|