1 # |
1 # |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 # |
3 # |
4 # Copyright 2018 Olaf Wintermann. All rights reserved. |
4 # Copyright 2011 Olaf Wintermann. All rights reserved. |
5 # |
5 # |
6 # Redistribution and use in source and binary forms, with or without |
6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are met: |
7 # modification, are permitted provided that the following conditions are met: |
8 # |
8 # |
9 # 1. Redistributions of source code must retain the above copyright |
9 # 1. Redistributions of source code must retain the above copyright |
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 # POSSIBILITY OF SUCH DAMAGE. |
26 # POSSIBILITY OF SUCH DAMAGE. |
27 # |
27 # |
28 |
28 |
29 |
|
30 # |
|
31 # available configurations: |
|
32 # gcc |
|
33 # clang |
|
34 # suncc |
|
35 # mingw |
|
36 # osx |
|
37 # bsd |
|
38 # |
|
39 |
|
40 CONF=gcc |
|
41 PREFIX=/usr |
29 PREFIX=/usr |
42 |
30 |
43 include $(CONF).mk |
31 all: config.mk build/bin build/lib build/ucx build/dav build/libidav build/test build/tool ucx libidav dav test |
44 include cppcheck.mk |
|
45 |
32 |
46 all: build/tool build/ucx build/libidav build/test ucx libidav dav test |
33 ucx: FORCE |
|
34 cd ucx; $(MAKE) all |
47 |
35 |
48 build: |
36 libidav: build/bin build/lib build/dav build/libidav build/tool FORCE |
49 mkdir -p build |
37 cd libidav; $(MAKE) all |
|
38 |
|
39 dav: FORCE build/bin build/lib build/dav build/libidav build/tool libidav ucx |
|
40 cd dav; $(MAKE) all |
50 |
41 |
51 build/tool: |
42 test: build/bin build/lib build/dav build/libidav build/test FORCE dav |
52 mkdir -p build/tool |
43 cd test; $(MAKE) all |
53 |
44 |
|
45 build/bin: |
|
46 mkdir -p build/bin |
|
47 |
|
48 build/lib: |
|
49 mkdir -p build/lib |
|
50 |
|
51 build/dav: |
|
52 mkdir -p build/dav |
|
53 |
|
54 build/libidav: |
|
55 mkdir -p build/libidav |
|
56 |
54 build/ucx: |
57 build/ucx: |
55 mkdir -p build/ucx |
58 mkdir -p build/ucx |
56 |
|
57 build/libidav: |
|
58 mkdir -p build/libidav |
|
59 |
59 |
60 build/test: |
60 build/test: |
61 mkdir -p build/test |
61 mkdir -p build/test |
62 |
62 |
63 ucx: FORCE |
63 build/tool: |
64 cd ucx; $(MAKE) CONF=$(CONF) all |
64 mkdir -p build/tool |
65 |
65 |
66 libidav: FORCE |
66 config.mk: |
67 cd libidav; $(MAKE) CONF=$(CONF) all |
67 @echo "create config" |
68 |
68 ./configure |
69 dav: FORCE libidav ucx |
|
70 cd dav; $(MAKE) CONF=$(CONF) all |
|
71 |
69 |
72 test: FORCE dav |
70 clean: |
73 cd test; $(MAKE) CONF=$(CONF) all |
71 @echo "clean" |
|
72 rm -f -R build |
74 |
73 |
75 run: FORCE dav |
74 cleanall: |
76 ./build/dav$(APP_EXT) |
75 @echo "clean all" |
|
76 rm -f -R build |
|
77 rm -f -R work |
|
78 rm -f config.mk |
77 |
79 |
78 clean: FORCE |
80 install: all |
79 $(RM) $(RMFLAGS) -R build/ |
81 cd make; $(MAKE) -f install.mk install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) |
80 |
|
81 install: FORCE |
|
82 @echo "install to $(DESTDIR)$(PREFIX)" |
|
83 ./install-sh -d $(DESTDIR)$(PREFIX)/bin |
|
84 ./install-sh build/dav $(DESTDIR)$(PREFIX)/bin |
|
85 ./install-sh build/dav-sync $(DESTDIR)$(PREFIX)/bin |
|
86 |
|
87 cppcheck: FORCE build |
|
88 truncate -s0 $(CPPCHECK_LOG) |
|
89 cd libidav; $(MAKE) cppcheck |
|
90 cd dav; $(MAKE) cppcheck |
|
91 @echo "Static code analysis complete. See $(CPPCHECK_LOG) for the results." |
|
92 |
82 |
93 FORCE: |
83 FORCE: |
94 |
84 |