From f1cd830c403ccbe681220f6b7e13fba7917fe28c Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Sat, 12 Mar 2022 17:38:31 +0000 Subject: add decimal<->binary Makefile rule * add decimal to binary and vice-versa Makefile rule Signed-off-by: Daniel Santos --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ab98ef1..ae8a326 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS := -Wall -Wextra -O2 DEP := numericx.c .PHONY: all -all: decimal-earth earth-decimal decimal-sun sun-decimal decimal-lori decimal-neonal decimal-nonal lori-decimal neonal-decimal nonal-decimal d-n1 d-neon1 n1-d neon1-d uninfinity +all: decimal-earth earth-decimal decimal-sun sun-decimal decimal-lori decimal-neonal decimal-nonal lori-decimal neonal-decimal nonal-decimal d-n1 d-neon1 n1-d neon1-d uninfinity decimal-binary binary-decimal decimal-earth: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"12345\" -o $@ $^ @@ -26,6 +26,9 @@ decimal-neonal: $(DEP) decimal-nonal: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^ +decimal-binary: $(DEP) + $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"01\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^ + lori-decimal: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"123456789@\" -DFROM_UNITS_ON_THE_END -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^ @@ -35,6 +38,9 @@ neonal-decimal: $(DEP) nonal-decimal: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^ +binary-decimal: $(DEP) + $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"01\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^ + d-n1: $(DEP) $(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"123456789\" -DTO_UNITS_ON_THE_END -DTO_INFINITE_BASE -o $@ $^ -- cgit 1.4.1-2-gfad0