-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
123 lines (94 loc) · 3.32 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# litmus Makefile. Generated from Makefile.in by configure.
SHELL = /bin/sh
# Installation directories
prefix = /usr/local
exec_prefix = ${prefix}
libexecdir = ${exec_prefix}/libexec
bindir = ${exec_prefix}/bin
datadir = ${datarootdir}
datarootdir = ${prefix}/share
# Toolchain settings
CC = gcc
CFLAGS = -I/opt/boxen/homebrew/include -I$(top_srcdir)/lib/neon
CPPFLAGS = -DHAVE_CONFIG_H -no-cpp-precomp -I${top_builddir} -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/test-common
LDFLAGS = -L/opt/boxen/homebrew/lib -flat_namespace
LIBS = -Llib/neon -lneon -dynamic -Wl,-search_paths_first -lkrb5 -lexpat
# expat may be in LIBOBJS, so must come after $(LIBS) (which has -lneon)
ALL_LIBS = -L. -ltest $(LIBS) $(LIBOBJS)
top_builddir = .
top_srcdir = .
AR = /usr/bin/ar
RANLIB = /usr/bin/ranlib
LIBOBJS =
TESTOBJS = src/common.o test-common/child.o test-common/tests.o
HDRS = src/common.h test-common/tests.h config.h
TESTS = basic copymove props locks http
HTDOCS = foo
URL = http://`hostname`/dav/
CREDS = `whoami` `whoami`
DIR = .
OPTS =
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL = /usr/bin/install -c
# Fixme; use $(LIBOBJS) here instead. not happy on many non-GNU makes
# though; not sure why.
ODEPS = subdirs libtest.a
all: $(TESTS)
@echo
@echo " Now run:"
@echo ""
@echo ' make URL=http://dav.server/path/ check'
@echo ' or make URL=http://dav.server/path/ CREDS="uname passwd" check'
@echo ""
litmus: litmus.in
@./config.status $@
check: $(TESTS) litmus
@test -d "$(DIR)" || mkdir "$(DIR)"
@rm -f $(DIR)/debug.log $(DIR)/child.log
@if test "$(DIR)" != "."; then echo "TESTS FOR $(DIR) ---"; fi
@cd $(DIR) && TESTROOT="$(top_builddir)" HTDOCS="$(top_srcdir)/htdocs" \
$(top_builddir)/litmus $(OPTS) $(URL) $(CREDS)
install: $(TESTS) litmus
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(libexecdir)/litmus
$(INSTALL) -d $(DESTDIR)$(datadir)/litmus/htdocs
$(INSTALL_PROGRAM) $(top_builddir)/litmus $(DESTDIR)$(bindir)/litmus
for t in $(TESTS); do \
$(INSTALL_PROGRAM) $(top_builddir)/$$t $(DESTDIR)$(libexecdir)/litmus/$$t; done
for d in $(HTDOCS); do \
$(INSTALL_DATA) $(top_srcdir)/htdocs/$$d $(DESTDIR)$(datadir)/litmus/htdocs/$d; done
props: src/props.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/props.o $(ALL_LIBS)
basic: src/basic.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/basic.o $(ALL_LIBS)
copymove: src/copymove.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/copymove.o $(ALL_LIBS)
locks: src/locks.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/locks.o $(ALL_LIBS)
http: src/http.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/http.o $(ALL_LIBS)
largefile: src/largefile.o $(ODEPS)
$(CC) $(LDFLAGS) -o $@ src/largefile.o $(ALL_LIBS)
subdirs:
@cd lib/neon && $(MAKE)
libtest.a: $(TESTOBJS)
$(AR) cru $@ $(TESTOBJS)
$(RANLIB) $@
clean:
@cd lib/neon && $(MAKE) clean
rm -f */*.o $(TESTS) largefile libtest.a *~ debug.log child.log
distclean: clean
@cd lib/neon && $(MAKE) distclean
rm Makefile litmus config.log config.h config.status
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
Makefile: $(top_srcdir)/Makefile.in
./config.status Makefile
src/basic.o: src/basic.c $(HDRS)
src/common.o: src/common.c $(HDRS)
src/copymove.o: src/copymove.c $(HDRS)
src/locks.o: src/locks.c $(HDRS)
src/props.o: src/props.c $(HDRS)
src/http.o: src/http.c $(HDRS)
src/largefile.o: src/largefile.c $(HDRS)