DEFINES= 
CFLAGS = -Os -ggdb -Wall -fno-builtin -nostdlib -fomit-frame-pointer -fno-unit-at-a-time -Wl,-evirus_start

all: test

casher: casher.c set_mark
	gcc $(CFLAGS) $(DEFINES) casher.c -o casher
	./set_mark casher

set_mark: ../Prepender/set_mark.c
	$(CC) $< -o $@

test: casher
	gcc -Wl,--hash-style=sysv ../Segments/victim.c -o victim
	cp /bin/ls .
	-./casher
	-./ls
	-./victim

clean:
	-@rm -f casher ls set_mark victim

.PHONY: all clean
