# Makefile for sample thread programs # This rule describes how to build a .o file from a .c file # -Wall tells gcc to print all warnings! .c.o: gcc -g -c -Wall $< # we need the Posix threads library LIBS=-lpthread all: threadecho threadecho2 threadecho: threadecho.c gcc -o threadecho threadecho.c ${LIBS} threadecho2: threadecho2.c gcc -g -o threadecho2 threadecho2.c ${LIBS}