-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
17 lines (12 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
xmas: xmas.c xmas.ld Makefile
gcc -T xmas.ld -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdlib -no-pie -o build/$@ $<
hello: hello.c Makefile
gcc -o build/$@ $<
hello-nostd: hello-syscall.c Makefile
gcc -Wl,-entry=startup -nostdlib -o build/$@ $<
hello-nostd-nopie: hello-syscall.c Makefile
gcc -no-pie -nostdlib -Wl,-e,startup -Wl,--build-id=none -fcf-protection=none -fno-stack-protector -fno-asynchronous-unwind-tables -fno-unwind-tables -o build/$@ $<
hello-data: hello-data.c Makefile
gcc -T hello.ld -no-pie -nostdlib -Wl,-e,startup -Wl,--build-id=none -fcf-protection=none -fno-stack-protector -fno-asynchronous-unwind-tables -fno-unwind-tables -o build/$@ $<
hello-cpp: hello-cpp.cpp hello-cpp.ld Makefile
gcc --std=c++23 -g -T hello-cpp.ld -no-pie -nostdlib --no-exceptions -Wl,-e,startup -Wl,--build-id=none -fcf-protection=none -fno-stack-protector -fno-asynchronous-unwind-tables -fno-unwind-tables -o build/$@ $<