From c68d7136feaa17f2ddfd4d56a325aeae8f8eec96 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 12 May 2023 18:35:41 -0400 Subject: sync --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 07ffbf4..24c88a5 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,20 @@ PATCH = 1 INCFLAGS = $(shell echo $(SOURCE) | xargs printf -- '-I%s ') CCFLAGS = -std=c89 -Wall -Wextra -pedantic -O2 -CCFLAGS += -D_DEFAULT_SOURCE -DMAJOR=$(MAJOR) -DMINOR=$(MINOR) -DPATCH=$(PATCH) -DCHECK_LINK +CCFLAGS += -DMAJOR=$(MAJOR) -DMINOR=$(MINOR) -DPATCH=$(PATCH) -DCHECK_LINK CCFLAGS += $(INCFLAGS) LDFLAGS = -s LDFLAGS += $(INCFLAGS) +UNAME := $(shell uname) + +ifeq ($(UNAME), Linux) +CCFLAGS += -D_GNU_SOURCE +else +CCFLAGS += -D_DEFAULT_SOURCE +endif + BIN = bin APP = $(BIN)/app SRC = $(shell find $(SOURCE) -name "*.c") -- cgit v1.2.3-freya