1 CC= cc 2 3 CFLAGS= -O -std=gnu99 -Wall 4 LIBS= -lpthread -lrt 5 6 PROG= time_test 7 8 SRCS= time_test.c cpuset.c threads.c logging.c 9 HDRS= spinlock.h cpuset.h threads.h logging.h 10 OBJS= $(SRCS:.c=.o) 11 12 all: $(PROG) 13 14 $(PROG): $(OBJS) 15 $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) 16 17 $(OBJS): $(HDRS) 18 19 clean: 20 -rm -f $(OBJS) 21 22 clobber: clean 23 -rm -f $(PROG) 24