]> rtime.felk.cvut.cz Git - orte.git/blob - Makefile.git
Update of local copy of Windows pthreads library to MinGW-w64 winpthreads.
[orte.git] / Makefile.git
1 default: git
2         @echo "Now you can run './configure'"
3
4 git:
5         autoreconf -i
6
7 all:
8         aclocal -I admin
9         autoheader
10         automake
11         autoconf
12
13 .PHONY: default git all dist dist-tarball
14
15 VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
16
17 CONFIGURE_FLAGS = --enable-orte-idl
18
19 configure: git
20
21 check: configure
22         $(MAKE) check-windows check-autotools check-java check-android
23
24 check-%:
25         rm -rf _$@
26         mkdir -p _$@
27         $(MAKE) -C _$@ -f ../Makefile.git $@.real
28
29 check-windows.real:
30 # We don't have libIDL for mingw, so we check without --enable-orte-idl
31         ../configure --prefix=/ --host=i586-mingw32msvc CC=i586-mingw32msvc-gcc || \
32         ../configure --prefix=/ --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc
33         make
34         make install DESTDIR=$(CURDIR)/_install
35         test -f _install/bin/liborte-*.dll
36
37
38 check-autotools.real:
39         ../configure $(CONFIGURE_FLAGS)
40         make
41
42 check-java.real: JAVAC=$(shell readlink -f $(which javac))
43 check-java.real: JAVA_HOME=$(JAVAC:%/bin/javac=%)
44 check-java.real:
45         ../configure --with-java=$(JAVA_HOME)
46         $(MAKE)
47         false # Java is not compiled - either fix it or update README
48
49 check-android:
50         android update project -p orte/libaorte
51         android update project -p orte/contrib/Robot_Demo
52         cd orte/libaorte && ndk-build
53         cd orte/contrib/Robot_Demo && ant debug
54         test -f orte/contrib/Robot_Demo/bin/RoboDruid-debug.apk
55
56 dist:
57         $(MAKE) VER=$(VER) dist-tarball dist-check
58         @echo "Tarball stored as orte-$(VER).tar.gz"
59
60 dist-tarball: orte-$(VER).tar.gz
61
62 orte-$(VER).tar.gz: $(shell git ls-files)
63 # Export clean sources and run autoreconf
64         test ! -d orte-$(VER)
65         git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
66         make -C orte-$(VER) -f Makefile.cvs
67         rm -rf orte-$(VER)/autom4te.cache
68 # Export sources again for building of documentation and copy generated orte manual to release dir
69         test ! -d orte-$(VER)-doc
70         git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
71         make -C orte-$(VER)-doc/doc
72         cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
73         rm -rf orte-$(VER)-doc
74 # Create tarball
75         tar czf $@ orte-$(VER)
76         rm -rf orte-$(VER)
77         @echo "Tarball stored as orte-$(VER).tar.gz"
78
79 dist-check: orte-$(VER).tar.gz
80         tar xf $<
81 # Check that we can compile the content of the tarball
82         mkdir orte-$(VER)/_build
83         cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
84         mkdir orte-$(VER)/_win
85         cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc $(CONFIGURE_FLAGS) && make V=0
86         rm -rf orte-$(VER)