aboutsummaryrefslogtreecommitdiff
blob: b0b054fec69a8559cc2d75d517052e97bf337fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
noinst_PROGRAMS = bad-gnustack
bad_gnustack_SOURCES = bad-gnustack.c
bad_gnustack_DEPENDENCIES = bad-asm.o
bad_gnustack_LDADD = bad-asm.o

EXTRA_DIST = bad64.asm bad32.asm

ARCH = $(shell uname -m | sed -e 's/i./x/')

bad-asm.o: bad64.asm bad32.asm
	[[ "$(ARCH)" == "x86" ]] && yasm -f elf -m x86 bad32.asm && mv bad32.o bad-asm.o || true
	[[ "$(ARCH)" == "x86_64" ]] && yasm -f elf -m amd64 bad64.asm && mv bad64.o bad-asm.o || true

check_SCRIPTS = test.sh
TEST = $(check_SCRIPTS)

test.sh:
	@echo "================================================================================"
	@echo
	@echo "Fixing Bad GNU_STACK Elf"
	@../src/fix-gnustack -f bad-gnustack
	@echo
	@echo "Fixed Bad GNU_STACK Elf"
	@../src/fix-gnustack bad-gnustack
	@echo
	@echo "================================================================================"

CLEANFILES = bad-asm.o test.sh