CC = gcc EXECUTABLES = testpipe testpipeprint LIBDIR = LIBS = -lpthread CFLAGS = -g all: $(EXECUTABLES) clean: rm -f core *.o $(EXECUTABLES) a.out testpipe: testpipe.c sim_pipe.o rw_threads.o sim_pipe.h rw_threads.h $(CC) $(CFLAGS) -o testpipe testpipe.c rw_threads.o sim_pipe.o $(LIBS) testpipedebug: testpipe.c sim_pipe.o rw_threads_debug.o sim_pipe.h rw_threads.h $(CC) $(CFLAGS) -o testpipedebug testpipe.c rw_threads_debug.o sim_pipe.o $(LIBS) testpipeprint: testpipe.c sim_pipe.o rw_threads_print.o sim_pipe.h rw_threads.h $(CC) $(CFLAGS) -o testpipeprint testpipe.c rw_threads_print.o sim_pipe.o $(LIBS) sim_pipe.o: sim_pipe.c sim_pipe.h $(CC) $(CFLAGS) -c sim_pipe.c rw_threads.o: rw_threads.c rw_threads.h $(CC) $(CFLAGS) -c rw_threads.c rw_threads_debug.o: rw_threads.c rw_threads.h $(CC) $(CFLAGS) -DDEBUG -o rw_threads_debug.o -c rw_threads.c rw_threads_print.o: rw_threads.c rw_threads.h $(CC) $(CFLAGS) -DPRINT -o rw_threads_print.o -c rw_threads.c