aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: ebbff3ea3bf848c92fb0e26b929ca1478d72df81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f $(objs)

.PHONY: clean