From b7c06abbcfb8460c570c181e8661022bf8943647 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Thu, 17 Mar 2022 19:03:42 +0000 Subject: [PATCH] Makefile accomodate separation of concerns * the source code was, in the last commit, separated, in order to create a library. Makes build the CLIs in the Makefile work. * make clean cleans the *.o Signed-off-by: Daniel Santos --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20d4f71..fff3e48 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ CC := c99 CFLAGS := -Wall -Wextra -O2 -DEP := numericx.c +DEP := cli.c numericx.o .PHONY: all all: decimal-to-earth earth-to-decimal decimal-to-sun sun-to-decimal decimal-to-lori decimal-to-nonal_inf decimal-to-nonal lori-to-decimal nonal_inf-to-decimal nonal-to-decimal uninfinity decimal-to-binary binary-to-decimal +numericx.o: numericx.c + $(CC) $(CFLAGS) -c $^ + decimal-to-earth: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"12345\" -o $@ $^ @@ -55,7 +58,7 @@ uninfinity: $(DEP) .PHONY: clean clean: - \rm -f *-to-* uninfinity + \rm -f *-to-* uninfinity *.o .PHONY: run run: decimal-to-earth