summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile')
-rw-r--r--t/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile b/t/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile
new file mode 100644
index 0000000..ddd8290
--- /dev/null
+++ b/t/recipes/checks/pe/missing-security-features-64-bit/build-spec/orig/Makefile
@@ -0,0 +1,33 @@
+MINGWCC = x86_64-w64-mingw32-gcc
+
+sources = hello.c
+safe = hello64.exe
+
+staticbase = $(patsubst %.exe,%-static-base.exe,$(safe))
+dataexecution = $(patsubst %.exe,%-data-execution.exe,$(safe))
+unsafeseh = $(patsubst %.exe,%-unsafe-seh.exe,$(safe))
+
+all: $(safe) $(staticbase) $(dataexecution) $(unsafeseh)
+
+$(safe): $(sources)
+ $(MINGWCC) -o $@ $^
+ genpeimg -d +d $@
+ genpeimg -d +n $@
+ genpeimg -d -s $@
+
+$(staticbase): $(safe)
+ cp $< $@
+ genpeimg -d -d $@
+
+$(dataexecution): $(safe)
+ cp $< $@
+ genpeimg -d -n $@
+
+$(unsafeseh): $(safe)
+ cp $< $@
+ # SEH is inverted
+ genpeimg -d +s $@
+
+.PHONY: clean
+clean:
+ rm -f $(safe) $(staticbase) $(dataexecution) $(unsafeseh)