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

all: test

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

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

test: addseg
	gcc victim.c -o victim
	-./addseg
	./victim
	cp /bin/ls .
	./victim
	./ls

clean:
	-@rm -f mover ls set_mark victim addseg

.PHONY: all clean
