From 321cda65cee378361160b2614e3368cdc403a369 Mon Sep 17 00:00:00 2001 From: Bill Lash Date: Sat, 22 Jun 2019 15:59:11 -0500 Subject: [PATCH] Add auto detection of MAC OS X --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8de6d46..436a1b7 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,13 @@ WCC=wcc # Enable compiler warnings. This is an absolute minimum. CFLAGS += -Wall -std=c99 #-Wextra -# If compiling on Apple's MacOS, uncomment this: -# MACOS = yes +# Determine if we are compiling on MAC OS X +ifneq ($(OS),Windows_NT) + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Darwin) + MACOS = yes + endif +endif # strdup, strndup CFLAGS += -D_POSIX_C_SOURCE=200809L -- 2.34.1