about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-17 21:37:08 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-17 21:37:08 +0000
commit63a4b2b9bb290528f8d9cda3d6b1723d5d56e414 (patch)
treea1829893ddabc18eb1f3cdf8f22b96cb2f28d6d4
parent8ffc581d8f59df6554c2d21f6bc7588ea3f35ff8 (diff)
downloadnumericx-c-63a4b2b9bb290528f8d9cda3d6b1723d5d56e414.tar.gz
add to Makefile libnumericx.a
 * add libnumericx.a static library building and clearing

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fff3e48..2e9aee2 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,12 @@ all: decimal-to-earth earth-to-decimal decimal-to-sun sun-to-decimal decimal-to-
 numericx.o: numericx.c
 	$(CC) $(CFLAGS) -c $^
 
+libnumericx.a: numericx.o
+	ar -rc libnumericx.a $^
+	ranlib $@
+
+libs: libnumericx.a
+
 decimal-to-earth: $(DEP)
 	$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"12345\" -o $@ $^
 
@@ -58,7 +64,7 @@ uninfinity: $(DEP)
 
 .PHONY: clean
 clean:
-	\rm -f *-to-* uninfinity *.o
+	\rm -f *-to-* uninfinity *.o *.a
 
 .PHONY: run
 run: decimal-to-earth