From 2803ad9ad7c65e8652e7ea8645296fb5aba8b042 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 20 Apr 2020 13:49:57 -0700 Subject: [PATCH] Added Mac build support C flag --- C/Makefile | 3 +++ Lua/Makefile | 3 +++ Makefile | 3 +++ Python/Makefile | 3 +++ 4 files changed, 12 insertions(+) diff --git a/C/Makefile b/C/Makefile index 0467ef0..40e79ef 100644 --- a/C/Makefile +++ b/C/Makefile @@ -5,6 +5,9 @@ CFLAGS=-std=c99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN=-Wall -Wpedantic -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers\ -Wno-padded -Wsign-conversion -Wno-missing-noreturn -Wno-cast-qual -Wtype-limits #CFLAGS += -fsanitize=address -fno-omit-frame-pointer +ifeq($(shell uname -s),Darwin) + CFLAGS += -D_DARWIN_C_SOURCE +endif G= all: ctest rainbow diff --git a/Lua/Makefile b/Lua/Makefile index d648527..d2af14a 100644 --- a/Lua/Makefile +++ b/Lua/Makefile @@ -5,6 +5,9 @@ CFLAGS=-std=c99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN=-Wall -Wpedantic -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers\ -Wno-padded -Wsign-conversion -Wno-missing-noreturn -Wno-cast-qual -Wtype-limits #CFLAGS += -fsanitize=address -fno-omit-frame-pointer +ifeq($(shell uname -s),Darwin) + CFLAGS += -D_DARWIN_C_SOURCE +endif G= LUA_DIR=/usr/local LUA_INC=$(LUA_DIR)/include diff --git a/Makefile b/Makefile index f15eac7..eac1457 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ CFLAGS=-std=c99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN=-Wall -Wpedantic -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers\ -Wno-padded -Wsign-conversion -Wno-missing-noreturn -Wno-cast-qual -Wtype-limits #CFLAGS += -fsanitize=address -fno-omit-frame-pointer +ifeq($(shell uname -s),Darwin) + CFLAGS += -D_DARWIN_C_SOURCE +endif G= all: checksyntax diff --git a/Python/Makefile b/Python/Makefile index e45737c..3dd5054 100644 --- a/Python/Makefile +++ b/Python/Makefile @@ -5,6 +5,9 @@ CFLAGS=-std=c99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L CWARN=-Wall -Wpedantic -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers\ -Wno-padded -Wsign-conversion -Wno-missing-noreturn -Wno-cast-qual -Wtype-limits #CFLAGS += -fsanitize=address -fno-omit-frame-pointer +ifeq($(shell uname -s),Darwin) + CFLAGS += -D_DARWIN_C_SOURCE +endif G= all: libbtui.so