From b755aad0b4fd50505738a9ad88d6b1d1af88b7e7 Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad Date: Mon, 25 Sep 2023 09:13:59 +0500 Subject: [PATCH] Fix Makefile --- Makefile | 5 +++-- hello.c | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 hello.c diff --git a/Makefile b/Makefile index 1690ef8..6d2f34a 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,15 @@ SRCS := $(wildcard src/*.c) OBJS := $(SRCS:src/%.c=build/%.o) DEPS := $(OBJS:.o=.d) +CC := gcc CFLAGS := -Wall -Wextra -Iinclude -DKILO_COMMIT_HASH=$(shell git rev-parse --short HEAD) -MMD -MP -std=c99 -ggdb kilo: $(OBJS) - gcc $^ -o $@ + $(CC) $^ -o $@ $(OBJS): build/%.o: src/%.c @mkdir -p build - gcc $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ clean: rm -rf build kilo diff --git a/hello.c b/hello.c deleted file mode 100644 index b4af39a..0000000 --- a/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main() { - printf("hello world\n"); -}