From 92910678282a06612b1824cc9eb5b3f067fcfb99 Mon Sep 17 00:00:00 2001 From: Ole Morud Date: Mon, 5 Jun 2023 21:29:01 +0200 Subject: [PATCH] Makefile: fix submodule update --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f6faef9..6e6a8a0 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ all : $(BUILD_DIR)/parse $(BUILD_DIR)/parse : $(OBJS) $(OBJ_DIR)/libarena.a | $(BUILD_DIR) Makefile $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) -o $@ -$(OBJ_DIR)/main.o : src/main.c arena-allocator | $(OBJ_DIR) Makefile +$(OBJ_DIR)/%.o : src/%.c $(wildcard include/%.h) | $(OBJ_DIR) Makefile arena-allocator $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -c $< -o $@ $(OBJ_DIR)/libarena.a : arena-allocator .gitmodules $(wildcard .git/modules/arena-allocator/HEAD) | $(OBJ_DIR) Makefile @@ -48,9 +48,6 @@ $(OBJ_DIR)/libarena.a : arena-allocator .gitmodules $(wildcard .git/modules/aren arena-allocator : .gitmodules git submodule update $@ -$(OBJ_DIR)/%.o : src/%.c include/%.h | $(OBJ_DIR) Makefile - $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -c $< -o $@ - $(BUILD_DIR) : mkdir -p $@ @@ -58,6 +55,6 @@ $(OBJ_DIR) : mkdir -p $@ clean : - rm -rfi $(OBJ_DIR) $(BUILD_DIR) + rm -rf $(OBJ_DIR) $(BUILD_DIR) arena-allocator .PHONY : clean all