Seperate source and build files in src and build (and build/bin)

This commit is contained in:
2025-06-26 10:55:10 +02:00
parent 2e8da5318f
commit 265ff06686
7 changed files with 27 additions and 15 deletions

View File

@ -1,17 +1,29 @@
tests: tests.o constants.o core.o console.o string.o file.o
ld tests.o constants.o core.o console.o string.o file.o -o tests -no-pie -z noexecstack
tests.o: tests.asm
nasm tests.asm -f elf64 -l tests.lst -g -F dwarf
constants.o: constants.asm
nasm constants.asm -f elf64 -l constants.lst -g -F dwarf
core.o: core.asm
nasm core.asm -f elf64 -l core.lst -g -F dwarf
console.o: console.asm
nasm console.asm -f elf64 -l console.lst -g -F dwarf
string.o: string.asm
nasm string.asm -f elf64 -l string.lst -g -F dwarf
file.o: file.asm
nasm file.asm -f elf64 -l file.lst -g -F dwarf
tests: build/tests.o build/constants.o build/core.o build/console.o build/string.o build/file.o
ld build/tests.o build/constants.o build/core.o build/console.o build/string.o build/file.o -o build/bin/tests -no-pie -z noexecstack -Ox
build/tests.o: src/tests.asm
nasm src/tests.asm -f elf64 -o build/tests.o
build/constants.o: src/constants.asm
nasm src/constants.asm -f elf64 -o build/constants.o
build/core.o: src/core.asm
nasm src/core.asm -f elf64 -o build/core.o
build/console.o: src/console.asm
nasm src/console.asm -f elf64 -o build/console.o
build/string.o: src/string.asm
nasm src/string.asm -f elf64 -o build/string.o
build/file.o: src/file.asm
nasm src/file.asm -f elf64 -o build/file.o
clean:
rm -f tests *.lst *.o testFile1.txt
rm -rf build
all:
make clean
mkdir -p build/bin
make tests
debug:
nasm src/tests.asm -f elf64 -o build/tests.o -l build/tests.lst -g -F dwarf
nasm src/constants.asm -f elf64 -o build/constants.o -l build/constants.lst -g -F dwarf
nasm src/core.asm -f elf64 -o build/core.o -l build/core.lst -g -F dwarf
nasm src/console.asm -f elf64 -o build/console.o -l build/console.lst -g -F dwarf
nasm src/string.asm -f elf64 -o build/string.o -l build/string.lst -g -F dwarf
nasm src/file.asm -f elf64 -o build/file.o -l build/file.lst -g -F dwarf
ld build/tests.o build/constants.o build/core.o build/console.o build/string.o build/file.o -o build/bin/tests -no-pie -z noexecstack -O0