3 # Gnu Makefile by "Brad Knotwell" <bknotwell@yahoo.com>
5 LIBOBJS=$(subst .c,.o,$(wildcard lib/*.c))
6 TESTDIRS=run swap mkdir creat thr1 syscall rw sysctl tcp udp
7 EXES=$(foreach dir,$(TESTDIRS),testcases/$(dir)/$(dir).test)
8 OBJS=$(subst .test,.o,$(EXES))
9 SRCS=$(subst .o,.c,$(OBJS))
10 LIBS=./lib/libstress.a
11 CFLAGS=-g -Wall -I./include
15 lib/libstress.a: lib/libstress.a($(LIBOBJS))
16 ranlib lib/libstress.a
18 lib/libstress.a(*.o): $(LIBOBJS)
22 $(EXES): %.test: %.o lib/libstress.a
25 $(CC) $(CFLAGS) $(LIBS) $< -o $@
28 rm -fr $(LIBOBJS) lib/libstress.a $(EXES) $(OBJS)