summaryrefslogtreecommitdiff
path: root/Makefile
blob: 84f30e92837e41cab21c2a2d97a079f63964ddd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#

CFILES = $(shell find core/ -name "*.c")
OFILES = $(CFILES:.c=.o)
DFILES = $(CFILES:.c=.d)
CC = gcc

CFLAGS =		\
	-Wall		\
	-pedantic	\
	-Iinclude	\
	-MMD

.PHONY: all
all: cescal

.PHONY: cescal
cescal: $(OFILES)
	$(CC) $^ -o $@

-include $(DFILES)
%.o: %.c
	$(CC) -c $< $(CFLAGS) -o $@

.PHONY: clean
clean:
	rm -f $(OFILES) $(DFILES)