19 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
19 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
20 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
20 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
21 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
21 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 |
23 |
24 include config.mk |
|
25 |
|
26 all: compile test-compile FORCE |
24 all: compile test-compile FORCE |
27 |
25 |
28 install: |
26 install: config.mk FORCE |
29 @cd src && $(MAKE) install |
27 @cd src && $(MAKE) install |
30 |
28 |
31 dist: FORCE |
29 dist: config.mk FORCE |
32 $(MKDIR) $(dist_dir)/libucx |
30 $(MAKE) -f make/makefile.mk dist |
33 $(COPYALL) CHANGELOG configure COPYING Doxyfile Makefile README \ |
|
34 uaplogo.png docs make src tests $(dist_dir)/libucx/ |
|
35 @cd $(dist_dir) && tar -czf libucx-src-$(VERSION).tar.gz -Hustar libucx |
|
36 @echo "[ Dist created: $(dist_dir)/libucx-src-$(VERSION).tar.gz ]" |
|
37 |
31 |
38 clean: |
32 clean: config.mk FORCE |
39 $(RMDIR) $(build_dir) |
33 $(MAKE) -f make/makefile.mk clean |
40 |
34 |
41 dist-clean: |
35 dist-clean: config.mk FORCE |
42 $(RMDIR) $(dist_dir) |
36 $(MAKE) -f make/makefile.mk dist-clean |
43 $(RMDIR) $(build_dir) |
|
44 |
37 |
45 compile: $(build_dir) static shared |
38 compile: config.mk FORCE |
|
39 $(MAKE) -f make/makefile.mk compile |
46 |
40 |
47 $(build_dir): |
41 test-compile: config.mk FORCE |
48 $(MKDIR) $@ |
42 $(MAKE) -f make/makefile.mk test-compile |
49 |
43 |
50 shared: FORCE |
44 check: config.mk FORCE |
51 @cd src && $(MAKE) OBJ_EXT=.shared.o \ |
45 $(MAKE) -f make/makefile.mk check |
52 CFLAGS="$(CFLAGS) $(SHLIB_CFLAGS)" \ |
|
53 LDFLAGS="$(LDFLAGS) $(SHLIB_LDFLAGS)" \ |
|
54 shared |
|
55 |
|
56 static: FORCE |
|
57 @cd src && $(MAKE) static |
|
58 |
|
59 check: all |
|
60 $(RMFILE) $(build_dir)/*.gcda |
|
61 $(RMFILE) $(build_dir)/tests/*.gcda |
|
62 $(build_dir)/tests/ucxtest |
|
63 |
46 |
64 check-coverage: FORCE |
47 check-coverage: FORCE |
65 $(MAKE) -s check |
48 $(MAKE) -s check |
66 @cd src && $(MAKE) check-coverage |
49 @cd src && $(MAKE) check-coverage |
67 |
50 |
68 test-compile: |
51 docs: config.mk FORCE |
69 cd tests && $(MAKE) |
52 $(MAKE) -f make/makefile.mk docs |
70 |
53 |
71 docs: FORCE |
54 update-rules: config.mk FORCE |
72 @(test "$(WITH_DOCS_API)" = "yes" && cd docs && $(MAKE) all-api) \ |
55 $(MAKE) -f make/makefile.mk update-rules |
73 || echo "[ Generation of API Docs disabled - skipped ]" |
|
74 @(test "$(WITH_DOCS_HTML)" = "yes" && cd docs && $(MAKE) all-html) \ |
|
75 || echo "[ Generation of HTML Docs disabled - skipped ]" |
|
76 |
56 |
77 update-rules: |
57 config.mk: |
78 make/update-rules.sh src |
58 ./configure --release |
79 CFLAGS='$(CFLAGS) -I../src' make/update-rules.sh tests '$$(TEST_DIR)' |
|
80 |
59 |
81 FORCE: |
60 FORCE: |