aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-03-07 10:07:58 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-03-07 10:07:58 +0100
commit36ffb88a365ecf9943e5739acb923a36f77d0c21 (patch)
treeeec97defc4958b044dd67469d7d72cfcd3386449 /Makefile
parent5ecd0fc61a1a292426538fcb1e791342e04953b5 (diff)
Minor tweaks
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8da53a4..ebbff3e 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,19 @@ MAKEFLAGS = -j8
srcs := $(shell find . -name '*.c')
objs := $(srcs:.c=.o)
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Linux)
+CC = gcc
+CFLAGS = -std=c23 -Iinclude
+endif
+ifeq ($(UNAME_S),Darwin)
+CC = gcc-13
+CFLAGS = -std=c2x -Iinclude
+endif
+
all: $(objs)
%.o: %.c
- gcc-13 -std=c2x -Iinclude -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(objs)