From 771a36c1de0f5743a48b952a2dbb8bce16066462 Mon Sep 17 00:00:00 2001 From: Albert Cahalan Date: Wed, 28 May 2008 01:13:25 +0000 Subject: [PATCH] Begasus wanted some BeOS/Haiku changes --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fae9401e5..aeeae2911 100644 --- a/Makefile +++ b/Makefile @@ -34,12 +34,14 @@ endif endif endif +# test if a library can be linked linktest = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) -o dummy.o dummy.c $(LDFLAGS) $(1) $(2) > /dev/null 2>&1; \ then \ echo "$(1)"; \ fi ;) -linktestdebug = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) -o dummy.o dummy.c $(LDFLAGS) $(1) $(2) 1>&2; \ +# test compiler options +comptest = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(1) $(2) -o dummy.o dummy.c $(LDFLAGS) > /dev/null 2>&1; \ then \ echo "$(1)"; \ fi ;) @@ -199,7 +201,7 @@ endif #-ffast-math OPTFLAGS:=-O2 CFLAGS:=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \ - -fvisibility=hidden \ + $(call comptest,-fvisibility=hidden,) \ -Wcast-align -Wredundant-decls \ -Wbad-function-cast -Wwrite-strings \ -Waggregate-return \