Archived
1
Fork 0
This repository has been archived on 2024-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
kilo/Makefile
Hadeed Ahmad 19716973cf Back to using gcc
For no reason whatsoever
2023-09-25 05:14:10 +05:00

18 lines
359 B
Makefile

SRCS := $(wildcard src/*.c)
OBJS := $(SRCS:src/%.c=build/%.o)
DEPS := $(OBJS:.o=.d)
CFLAGS := -Wall -Wextra -Iinclude -DKILO_COMMIT_HASH=$(shell git rev-parse --short HEAD) -MMD -MP -std=c99 -ggdb
kilo: $(OBJS)
gcc $^ -o $@
$(OBJS): build/%.o: src/%.c
@mkdir -p build
gcc $(CFLAGS) -c $< -o $@
clean:
rm -rf build kilo
.PHONY: clean
-include $(DEPS)