about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-12 17:38:31 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-12 17:38:31 +0000
commitf1cd830c403ccbe681220f6b7e13fba7917fe28c (patch)
tree23a95d3eb0af12c55cb96d94f864592e2b19be8d /Makefile
parent6e579c2763f39132237551b4521ef31f3ea0183d (diff)
downloadnumericx-c-f1cd830c403ccbe681220f6b7e13fba7917fe28c.tar.gz
add decimal<->binary Makefile rule
 * add decimal to binary and vice-versa Makefile rule

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
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 $@ $^