From aafc16f44969a33e2180c0ca052cb527825430fb Mon Sep 17 00:00:00 2001 From: Luca Saiu Date: Thu, 11 Nov 2021 10:27:13 +0100 Subject: [PATCH] define platform-identification CPP macros --- Makefile.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile.conf b/Makefile.conf index 414ad310..16bbd5f7 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -87,6 +87,7 @@ endif # Are we wiping this on purpose? LDLIBS= +# Define compiler. ifeq ($(BUILD_FOR),OS/390) CC=xlclang else ifeq ($(BUILD_FOR),Linux) @@ -95,6 +96,16 @@ else ifeq ($(BUILD_FOR),Darwin) CC=clang endif +# Define platform-identification feature macros. +ifeq ($(BUILD_FOR),Linux) + CPPFLAGS+= -DUNIX +else ifeq ($(BUILD_FOR),Darwin) + CPPFLAGS+= -DUNIX -DDARWIN +else ifeq ($(BUILD_FOR),OS/390) + CPPFLAGS+= -DZOS +endif + +# Add platform-specific compilation options. ifeq ($(BUILD_FOR),OS/390) CFLAGS= -Wno-gnu-include-next -qnosearch -I$(HERE) -I. CFLAGS+= -I/usr/include