32 lines
1.1 KiB
Makefile
32 lines
1.1 KiB
Makefile
CFLAGS=-lm -g -Wall -O1
|
|
|
|
# TODO: Move this to a build.zig. This is becoming a mess, I don't want to deal with Makefiles anymore
|
|
|
|
build/main: src/main.c src/repetition_tester.c build/multi_nop_loop.o build/write_loops.o build/load_uop.o build/store_uop.o build/short_load_uop.o src/rprof.h build/read_widths.o
|
|
mkdir -p build
|
|
gcc -o build/main src/main.c build/multi_nop_loop.o build/write_loops.o build/load_uop.o build/store_uop.o build/short_load_uop.o build/read_widths.o $(CFLAGS)
|
|
|
|
build/short_load_uop.o: src/short_load_uop.asm
|
|
nasm -g -f elf64 -o build/short_load_uop.o src/short_load_uop.asm
|
|
|
|
build/load_uop.o: src/load_uop.asm
|
|
nasm -g -f elf64 -o build/load_uop.o src/load_uop.asm
|
|
|
|
build/write_loops.o: src/write_loops.asm
|
|
nasm -g -f elf64 -o build/write_loops.o src/write_loops.asm
|
|
|
|
build/multi_nop_loop.o: src/multi_nop_loop.asm
|
|
nasm -g -f elf64 -o build/multi_nop_loop.o src/multi_nop_loop.asm
|
|
|
|
build/store_uop.o: src/store_uop.asm
|
|
nasm -g -f elf64 -o build/store_uop.o src/store_uop.asm
|
|
|
|
build/read_widths.o: src/read_widths.asm
|
|
nasm -g -f elf64 -o build/read_widths.o src/read_widths.asm
|
|
|
|
run: ./build/main
|
|
./build/main $(TEST_NAME)
|
|
|
|
clean:
|
|
rm -r build
|