Files
glisp/Makefile
2026-01-16 03:20:38 -08:00

23 lines
355 B
Makefile

CC=gcc
CFLAGS=-g -std=c11 -Wall -Wpedantic
LD=gcc
LDFLAGS=-g
SRCS=$(wildcard src/*.c)
OBJS=$(SRCS:src/%.c=bin/%.o)
DEPS=$(SRCS:src/%.c=bin/deps/%.d)
glisp: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
bin/%.o: src/%.c
@mkdir -p bin/deps
$(CC) $(CFLAGS) -c -MMD -MF $(<:src/%.c=bin/deps/%.d) -o $@ $<
clean:
rm -rf glisp bin/
.PHONY: clean
-include $(DEPS)