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

23 lines
397 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
2023-08-31 02:33:55 +00:00
WARNING_FLAGS := -Wall -Wextra
2023-08-31 04:19:35 +00:00
INCLUDE_FLAGS := -I include
2023-08-31 02:33:55 +00:00
2023-08-31 04:19:35 +00:00
CC := clang
2023-09-01 15:04:12 +00:00
CFLAGS := $(WARNING_FLAGS) $(INCLUDE_FLAGS) -MMD -MP -std=c99 -ggdb
2023-08-31 02:33:55 +00:00
kilo: $(OBJS)
$(CC) $(CFLAGS) $^ -o $@
$(OBJS): build/%.o: src/%.c
@mkdir -p build
$(CC) $(CFLAGS) -c $< -o $@
2023-08-24 13:00:53 +00:00
clean:
2023-08-31 02:33:55 +00:00
rm -rf build
2023-08-24 13:00:53 +00:00
rm -f ./kilo
2023-08-31 02:33:55 +00:00
-include $(DEPS)