CC = gcc
CFLAGS = -Wall -pedantic -g

PROGRAMS = fork0 fork1 fork2 fork3 \
           wait1 wait2 waitpid1 \
           envp execve1 execve2 \
           clone fopen \
           segfault1 segfault2 segfault3 segfault4 execve2 \
           div0 alarm1 alarm2 alarm3 alarm4 consistencia \
           sigcont sigterm sigint \
	   sleep0 sleep \
	   wait1 waitpid1 \
	   sigchld1 sigsuspend sigchld2 sigchld3 \
	   sigcont duelo1 duelo2 duelo3 encadeados \
	   encad-bloq1 encad-bloq2 attach attach_SIGUSR1 \
	   thr-sinais1

all: $(PROGRAMS)

thr-sinais1: thr-sinais1.c
	$(CC) $(CFLAGS) -lpthread thr-sinais1.c -o thr-sinais1

clean:
	rm -f *.o *~ *.aux *.log *.dvi $(PROGRAMS)