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 <dacs.git@brilhante.top>
This commit is contained in:
parent
2bea495fe6
commit
b7c06abbcf
7
Makefile
7
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
|
||||
|
|
Loading…
Reference in New Issue