summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-05-12 18:35:41 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-05-12 18:35:41 -0400
commitc68d7136feaa17f2ddfd4d56a325aeae8f8eec96 (patch)
tree32d3a2ac655b1a0a16ef6549c117b0fbf4106797 /Makefile
parentchown, chmod (diff)
downloadlazysphere-c68d7136feaa17f2ddfd4d56a325aeae8f8eec96.tar.gz
lazysphere-c68d7136feaa17f2ddfd4d56a325aeae8f8eec96.tar.bz2
lazysphere-c68d7136feaa17f2ddfd4d56a325aeae8f8eec96.zip
sync
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
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")