diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) |