-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (24 loc) · 868 Bytes
/
Makefile
File metadata and controls
36 lines (24 loc) · 868 Bytes
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
CXXFLAGS = -std=c++17 -W -Wall -O3 -ffast-math -fno-exceptions -fno-rtti -I../code
CXX = clang++ -stdlib=libc++ -march=native
#CXX = g++ -march=native
#CXX = armv7a-hardfloat-linux-gnueabi-g++ -static -mfpu=neon -march=armv7-a
#QEMU = qemu-arm
#CXX = aarch64-unknown-linux-gnu-g++ -static -march=armv8-a+crc+simd -mtune=cortex-a72
#QEMU = qemu-aarch64
CHUNKS := $(shell seq -f "chunk%02g.cpf" 0 99)
ERASED := $(shell seq -f "chunk%02g.cpf" 0 99 | sort -R | head -n 49)
.PHONY: all
all: encode decode
test: encode decode
dd if=/dev/urandom of=input.dat bs=512 count=512
$(QEMU) ./encode input.dat 5380 $(CHUNKS)
$(QEMU) ./decode output.dat $(ERASED)
diff -q -s input.dat output.dat
rm input.dat output.dat $(CHUNKS)
encode: encode.cc
$(CXX) $(CXXFLAGS) $< -o $@
decode: decode.cc
$(CXX) $(CXXFLAGS) $< -o $@
.PHONY: clean
clean:
rm -f encode decode