build: Move --without-json-audit and json lib detection to lib/audit_logging
[samba.git] / Makefile
1 # simple makefile wrapper to run waf
2
3 PYTHON?=python
4 WAF_BINARY=$(PYTHON) ./buildtools/bin/waf
5 WAF=WAF_MAKE=1 $(WAF_BINARY)
6
7 all:
8         $(WAF) build
9
10 install:
11         $(WAF) install
12
13 uninstall:
14         $(WAF) uninstall
15
16 test:
17         $(WAF) test $(TEST_OPTIONS)
18
19 perftest:
20         $(WAF) test --perf-test $(TEST_OPTIONS)
21
22 help:
23         @echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
24         $(WAF) --help
25
26 subunit-test:
27         $(WAF) test --filtered-subunit $(TEST_OPTIONS)
28
29 testenv:
30         $(WAF) test --testenv $(TEST_OPTIONS)
31
32 gdbtestenv:
33         $(WAF) test --testenv --gdbtest $(TEST_OPTIONS)
34
35 quicktest:
36         $(WAF) test --quick $(TEST_OPTIONS)
37
38 randomized-test:
39         $(WAF) test --random-order $(TEST_OPTIONS)
40
41 testlist:
42         $(WAF) test --list $(TEST_OPTIONS)
43
44 dist:
45         touch .tmplock
46         WAFLOCK=.tmplock $(WAF) dist
47
48 distcheck:
49         touch .tmplock
50         WAFLOCK=.tmplock $(WAF) distcheck
51
52 clean:
53         $(WAF) clean
54
55 distclean:
56         $(WAF) distclean
57
58 reconfigure: configure
59         $(WAF) reconfigure
60
61 show_waf_options:
62         $(WAF) --help
63
64 # some compatibility make targets
65 everything: all
66
67 testsuite: all
68
69 check: test
70
71 torture: all
72
73 # this should do an install as well, once install is finished
74 installcheck: test
75
76 etags:
77         $(WAF) etags
78
79 ctags:
80         $(WAF) ctags
81
82 pydoctor:
83         $(WAF) pydoctor
84
85 pep8:
86         $(WAF) pep8
87
88 # Adding force on the depencies will force the target to be always rebuild form the Make
89 # point of view forcing make to invoke waf
90
91 bin/smbd: FORCE
92         $(WAF) --targets=smbd/smbd
93
94 bin/winbindd: FORCE
95         $(WAF) --targets=winbindd/winbindd
96
97 bin/nmbd: FORCE
98         $(WAF) --targets=nmbd/nmbd
99
100 bin/smbclient: FORCE
101         $(WAF) --targets=client/smbclient
102
103 # this allows for things like "make bin/smbtorture"
104 # mainly for the binary that don't have a broken mode like smbd that must
105 # be build with smbd/smbd
106 bin/%: FORCE
107         $(WAF) --targets=$(subst bin/,,$@)
108
109 # Catch all rule to be able to call make service_repl in order to find the name
110 # of the submodule you want to build, look at the wscript
111 %:
112         $(WAF) --targets=$@
113
114 # This rule has to be the last one
115 FORCE:
116 # Having .NOTPARALLEL will force make to do target once at a time but still -j
117 # will be present in the MAKEFLAGS that are in turn interpreted by WAF
118 # so only 1 waf at a time will be called but it will still be able to do parralel builds if
119 # instructed to do so
120 .NOTPARALLEL: %
121 .PHONY: FORCE everything testsuite check torture