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

19 lines
359 B
Makefile
Raw Normal View History

2023-08-31 02:33:55 +00:00
SRCS := $(wildcard src/*.c)
OBJS := $(SRCS:src/%.c=build/%.o)
DEPS := $(OBJS:.o=.d)
2023-08-22 21:32:16 +00:00
CFLAGS := -Wall -Wextra -Iinclude -DKILO_COMMIT_HASH=$(shell git rev-parse --short HEAD) -MMD -MP -std=c99 -ggdb
2023-08-31 02:33:55 +00:00
kilo: $(OBJS)
gcc $^ -o $@
2023-08-31 02:33:55 +00:00
$(OBJS): build/%.o: src/%.c
@mkdir -p build
gcc $(CFLAGS) -c $< -o $@
2023-08-24 13:00:53 +00:00
clean:
rm -rf build kilo
2023-08-31 02:33:55 +00:00
.PHONY: clean
2023-08-31 02:33:55 +00:00
-include $(DEPS)