CFLAGS = -O2 -W -Wall -Wno-unused-parameter #LDFLAGS = -lgsl -lgslcblas -g3 #LDFLAGS = -g3 all: nullsys gtod dup open creat fstat stat pmutex siginst sigcatch fork pthread_create exec vexec malloc pctx pctx_yield pctx_nort mmap protfault pagefault teardown write write_ext2 dwrite_ext2 writefsync_ext2 read read_ext2 dread_ext2 times timer pipe ppipe tcp ptcp pudp pconnect clean: rm -f bench.o nullsys.o nullsys gtod.o gtod dup.o dup open.o open creat.o creat fstat.o fstat stat.o stat pmutex.o pmutex siginst.o siginst sigcatch.o sigcatch fork.o fork pthread_create.o pthread_create exec.o exec vexec.o vexec malloc.o malloc pctx.o pctx pctx_yield.o pctx_yield pctx_nort.o pctx_nort mmap.o mmap protfault.o protfault pagefaut.o pagefault teardown.o teardown write.o write write_ext2.o write_ext2 dwrite_ext2.o dwrite_ext2 writefsync_ext2.o writefsync_ext2 read.o read read_ext2.o read_ext2 dread_ext2.o dread_ext2 times.o times timer.o timer pipe.o pipe ppipe.o ppipe tcp.o tcp ptcp.o ptcp pudp.o pudp pconnect.o pconnect nullsys: nullsys.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -onullsys nullsys.c bench.c gtod: gtod.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ogtod gtod.c bench.c dup: dup.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -odup dup.c bench.c open: open.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oopen open.c bench.c creat: creat.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ocreat creat.c bench.c stat: stat.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ostat stat.c bench.c fstat: fstat.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ofstat fstat.c bench.c pmutex: pmutex.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lpthread -opmutex pmutex.c bench.c siginst: siginst.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -osiginst siginst.c bench.c sigcatch: sigcatch.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -osigcatch sigcatch.c bench.c fork: fork.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ofork fork.c bench.c pthread_create: pthread_create.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lpthread -opthread_create pthread_create.c bench.c exec: exec.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oexec exec.c bench.c vexec: vexec.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ovexec vexec.c bench.c malloc: malloc.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -omalloc malloc.c bench.c pctx: pctx.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opctx pctx.c bench.c pctx_yield: pctx_yield.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opctx_yield pctx_yield.c bench.c pctx_nort: pctx_nort.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opctx_nort pctx_nort.c bench.c mmap: mmap.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -ommap mmap.c bench.c protfault: protfault.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oprotfault protfault.c bench.c pagefault: pagefault.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -opagefault pagefault.c bench.c teardown: teardown.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oteardown teardown.c bench.c write: write.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -owrite write.c bench.c write_ext2: write_ext2.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -owrite_ext2 write_ext2.c bench.c dwrite_ext2: dwrite_ext2.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -odwrite_ext2 dwrite_ext2.c bench.c writefsync_ext2: writefsync_ext2.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -owritefsync_ext2 writefsync_ext2.c bench.c read: read.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oread read.c bench.c read_ext2: read_ext2.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -oread_ext2 read_ext2.c bench.c dread_ext2: dread_ext2.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -odread_ext2 dread_ext2.c bench.c times: times.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -otimes times.c bench.c timer: timer.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -otimer timer.c bench.c pipe: pipe.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opipe pipe.c bench.c ppipe: ppipe.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -oppipe ppipe.c bench.c tcp: tcp.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -otcp tcp.c bench.c ptcp: ptcp.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -optcp ptcp.c bench.c pudp: pudp.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opudp pudp.c bench.c pconnect: pconnect.c bench.h bench.c $(CC) $(CFLAGS) $(LDFLAGS) -lrt -opconnect pconnect.c bench.c