numericx/Makefile

71 lines
3.9 KiB
Makefile

CC := c99
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 decimal-binary binary-decimal
decimal-earth: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"12345\" -o $@ $^
earth-decimal: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"12345\" -DTO_NUMERICALS=\"0123456789\" -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^
decimal-sun: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"123456789\" -o $@ $^
sun-decimal: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"123456789\" -DTO_NUMERICALS=\"0123456789\" -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^
decimal-lori: $(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 -o $@ $^
decimal-neonal: $(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 -o $@ $^
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 $@ $^
neonal-decimal: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^
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 $@ $^
d-neon1: $(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 -o $@ $^
n1-d: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"123456789\" -DFROM_UNITS_ON_THE_END -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -DTO_INFINITE_BASE -o $@ $^
neon1-d: $(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 $@ $^
uninfinity: $(DEP)
$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_UNITS_ON_THE_END -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"0123456789\" -DTO_UNITS_ON_THE_END -DTO_FIRST_NUMBER_VOID -o $@ $^
.PHONY: clean
clean:
\rm -f *-decimal decimal-* d-n* *1-d uninfinity
.PHONY: run
run: decimal-earth
./decimal-earth 21
.PHONY: mem
mem: decimal-earth
valgrind --leak-check=full --show-leak-kinds=all -s decimal-earth 999