I have seen the given two makefiles as follows:
all: thread1 thread2 thread3 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread clea
Your question is answered here
gcc: Do I need -D_REENTRANT with pthreads?
Essentially all you need is
gcc thread1.c -o thread1 -pthread
and gcc will handle all the defines for you.