| Line | |
|---|
| 1 | # foo. |
|---|
| 2 | TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2) |
|---|
| 3 | PROGS:=$(patsubst %.t,%.p,$(TEST_SRCS)) |
|---|
| 4 | HARNESS_SRCS:=main.c |
|---|
| 5 | # io_queue.c |
|---|
| 6 | |
|---|
| 7 | CFLAGS=-Wall -Werror -g -O -laio |
|---|
| 8 | #-lpthread -lrt |
|---|
| 9 | |
|---|
| 10 | all: $(PROGS) |
|---|
| 11 | |
|---|
| 12 | $(PROGS): %.p: %.t $(HARNESS_SRCS) |
|---|
| 13 | $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c |
|---|
| 14 | |
|---|
| 15 | clean: |
|---|
| 16 | rm -f $(PROGS) *.o runtests.out rofile wofile rwfile |
|---|
| 17 | |
|---|
| 18 | .PHONY: |
|---|
| 19 | |
|---|
| 20 | testdir/rofile: .PHONY |
|---|
| 21 | rm -f $@ |
|---|
| 22 | echo "test" >$@ |
|---|
| 23 | chmod 400 $@ |
|---|
| 24 | |
|---|
| 25 | testdir/wofile: .PHONY |
|---|
| 26 | rm -f $@ |
|---|
| 27 | echo "test" >$@ |
|---|
| 28 | chmod 200 $@ |
|---|
| 29 | |
|---|
| 30 | testdir/rwfile: .PHONY |
|---|
| 31 | rm -f $@ |
|---|
| 32 | echo "test" >$@ |
|---|
| 33 | chmod 600 $@ |
|---|
| 34 | |
|---|
| 35 | check: $(PROGS) testdir/rofile testdir/rwfile testdir/wofile |
|---|
| 36 | ./runtests.sh $(PROGS) |
|---|
| 37 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.