File size: 624 Bytes
6183f29 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
CC := gcc
CFLAGS := -O3 -Ofast -ffast-math
CLIBS := -fopenmp
C_TOKENIZER := tokenizer.bin
SRC := *.c tokenizer.o
TARGET := a.out
all: $(TARGET)
clean:
$(RM) $(TARGET) *.o
wipe:
make clean
$(RM) *.bin *.txt
run: $(TARGET)
./$< data.txt data.bin
$(C_TOKENIZER):
awk 'BEGIN {for (i = 0; i <= 255; i++) printf("%c%c%c", i, 0, 0)}' > $@
#elf64-littleaarch64
tokenizer.o: $(C_TOKENIZER)
objcopy --input-target binary \
--output-target elf64-x86-64 \
$< $@
#--redefine-sym _binary_tokenizer_bin_start=_embedded_binary_tokenizer \
#$< $@
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $^ $(CLIBS)
|