CC = gcc
CFLAGS = -Wall -g -fno-stack-protector -O0
LDFLAGS = -z execstack

PROGRAMS = pilha pilha2 \
           buffer buffer-strcpy buffer-strcpy-stack-protector \
	   execve \
           map-armadilha map-vitima map-armadilha-exit \
           map-armadilha-execve map-armadilha-execve2

all: $(PROGRAMS)

buffer-strcpy-stack-protector: buffer-strcpy.c
	$(CC) -g buffer-strcpy.c -o buffer-strcpy-stack-protector

buffer-libc-stack-protector: buffer-libc.c
	$(CC) -g buffer-libc.c -o buffer-libc-stack-protector

clean:
	rm -f *~ $(PROGRAMS)