BINS = cas-aba-issue cas-ptr-generation a64-basic-llsc a64-llsc CFLAGS_cas-ptr-generation = -mcx16 CFLAGS = -g -O3 -Wall -Wextra $(CFLAGS_$(*)) A64_SYSROOT = /usr/aarch64-linux-gnu run: $(BINS:%=run-%) build: $(BINS:%=%.elf) # -- HOST NATIVE TARGETS ------------------------------------------------------- run-%: %.elf ./$^ %.elf : %.cc $(CXX) $(CFLAGS) -o $@ $^ -latomic disasm: cas-ptr-generation.elf objdump -C -d -j .text -M intel --no-show-raw-insn --visualize-jumps=color $^ | less -R # -- ARM64 CROSS TARGETS ------------------------------------------------------- a64-%.elf: a64-%.cc clang++ $(CFLAGS) -target aarch64-linux-gnu --sysroot=$(A64_SYSROOT) -fuse-ld=lld -o $@ $^ #llvm-objdump -j .text -C -d $@ run-a64-%: a64-%.elf qemu-aarch64 -L $(A64_SYSROOT) -E LD_LIBRARY_PATH=$(A64_SYSROOT)/lib64 $^ # -- MISC TARGETS -------------------------------------------------------------- fmt: clang-format -i *.cc clean: $(RM) *.elf