add to Makefile libnumericx.a

* add libnumericx.a static library building and clearing

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
This commit is contained in:
Daniel Santos 2022-03-17 21:37:08 +00:00
parent 8ffc581d8f
commit 63a4b2b9bb
1 changed files with 7 additions and 1 deletions

View File

@ -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