From d1f84a6a2c19686090968e254216c8d68744fe45 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 26 Oct 2023 10:22:10 +0100 Subject: Makefile now prints dependencies on successful compilation --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6fa4b58..e1fa63c 100644 --- a/Makefile +++ b/Makefile @@ -57,38 +57,38 @@ examples: $(EXAMPLES_DIST) $(EXAMPLES) $(LIB_DIST)/%.o: $(LIB_SRC)/%.c @$(CC) $(LIB_CFLAGS) -MMD -c $< -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $<" ## VM Recipes $(VM_OUT): $(LIB_OBJECTS) $(VM_OBJECTS) $(VM_DIST)/main.o @$(CC) $(VM_CFLAGS) $^ -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $^" -include $(VM_DEPS) $(VM_DIST)/%.o: $(VM_SRC)/%.c @$(CC) $(VM_CFLAGS) -MMD -c $< -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $<" ## ASSEMBLY Recipes $(ASM_OUT): $(LIB_OBJECTS) $(VM_DIST)/inst.o $(ASM_OBJECTS) $(ASM_DIST)/main.o @$(CC) $(ASM_CFLAGS) $^ -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $^" -include $(ASM_DEPS) $(ASM_DIST)/%.o: $(ASM_SRC)/%.c @$(CC) $(ASM_CFLAGS) -MMD -c $< -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $<" ## EXAMPLES recipes $(DIST)/fib.out: $(LIB_OBJECTS) $(VM_OBJECTS) $(ASM_OBJECTS) $(EXAMPLES_DIST)/fib.o @$(CC) $(EXAMPLES_CFLAGS) $^ -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $^" $(EXAMPLES_DIST)/%.o: $(EXAMPLES_SRC)/%.c @$(CC) $(EXAMPLES_CFLAGS) -MMD -c $< -o $@ $(LIBS) - @echo -e "$(TERM_GREEN)$@$(TERM_RESET)" + @echo -e "$(TERM_GREEN)$@$(TERM_RESET): $<" OUT= ARGS= -- cgit v1.2.3-13-gbd6f