26 lines
365 B
Makefile
26 lines
365 B
Makefile
|
|
# Copyright (c) 2026, Chloe Moffett
|
||
|
|
# Provided under the BSD-3 clause
|
||
|
|
#
|
||
|
|
|
||
|
|
CFILES = $(shell find . -name "*.c")
|
||
|
|
OFILES = $(CFILES:.c=.o)
|
||
|
|
DFILES = $(CFILES:.c=.d)
|
||
|
|
CC = gcc
|
||
|
|
|
||
|
|
CFLAGS = \
|
||
|
|
-Wall \
|
||
|
|
-pedantic \
|
||
|
|
-MMD \
|
||
|
|
-Iinc
|
||
|
|
|
||
|
|
.PHONY: all
|
||
|
|
all: $(OFILES)
|
||
|
|
|
||
|
|
-include $(DFILES)
|
||
|
|
%.o: %.c
|
||
|
|
$(CC) -c $< $(CFLAGS) -o $@
|
||
|
|
|
||
|
|
.PHONY: clean
|
||
|
|
clean:
|
||
|
|
rm -f $(OFILES) $(DFILES)
|