Seperate source and build files in src and build (and build/bin)
This commit is contained in:
42
makefile
42
makefile
@ -1,17 +1,29 @@
|
|||||||
tests: tests.o constants.o core.o console.o string.o file.o
|
tests: build/tests.o build/constants.o build/core.o build/console.o build/string.o build/file.o
|
||||||
ld tests.o constants.o core.o console.o string.o file.o -o tests -no-pie -z noexecstack
|
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
|
||||||
tests.o: tests.asm
|
build/tests.o: src/tests.asm
|
||||||
nasm tests.asm -f elf64 -l tests.lst -g -F dwarf
|
nasm src/tests.asm -f elf64 -o build/tests.o
|
||||||
constants.o: constants.asm
|
build/constants.o: src/constants.asm
|
||||||
nasm constants.asm -f elf64 -l constants.lst -g -F dwarf
|
nasm src/constants.asm -f elf64 -o build/constants.o
|
||||||
core.o: core.asm
|
build/core.o: src/core.asm
|
||||||
nasm core.asm -f elf64 -l core.lst -g -F dwarf
|
nasm src/core.asm -f elf64 -o build/core.o
|
||||||
console.o: console.asm
|
build/console.o: src/console.asm
|
||||||
nasm console.asm -f elf64 -l console.lst -g -F dwarf
|
nasm src/console.asm -f elf64 -o build/console.o
|
||||||
string.o: string.asm
|
build/string.o: src/string.asm
|
||||||
nasm string.asm -f elf64 -l string.lst -g -F dwarf
|
nasm src/string.asm -f elf64 -o build/string.o
|
||||||
file.o: file.asm
|
build/file.o: src/file.asm
|
||||||
nasm file.asm -f elf64 -l file.lst -g -F dwarf
|
nasm src/file.asm -f elf64 -o build/file.o
|
||||||
|
|
||||||
clean:
|
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
|
||||||
|
Reference in New Issue
Block a user