2 @echo "Now you can run './configure'"
13 .PHONY: default git all dist dist-tarball
15 VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
17 CONFIGURE_FLAGS = --enable-orte-idl
22 $(MAKE) -f Makefile.git check-omk check-autotools check-windows check-windows-omk check-java check-android
27 $(MAKE) -C _$@ -f ../Makefile.git $@.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
34 make install DESTDIR=$(CURDIR)/_install
35 test -f _install/bin/liborte-*.dll
37 check-windows-omk.real:
38 echo "TARGET_OS=win32" > config.omk
39 echo "CC=i686-w64-mingw32-gcc" >> config.omk
40 echo "CXX=i686-w64-mingw32-g++" >> config.omk
41 echo "AR=i686-w64-mingw32-ar" >> config.omk
42 echo "LD=i686-w64-mingw32-ld" >> config.omk
43 ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
47 ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
51 ../configure $(CONFIGURE_FLAGS)
54 check-java.real: JAVAC=$(shell readlink -f $(shell which javac))
55 check-java.real: JAVA_HOME=$(JAVAC:%/bin/javac=%)
57 test -d "$(JAVA_HOME)"
58 ../configure --with-java=$(JAVA_HOME)
61 test -f ../orte/java/lib/orte.jar
64 android update project -p orte/libaorte
65 android update project -p orte/contrib/Robot_Demo
66 cd orte/libaorte && ndk-build
67 cd orte/contrib/Robot_Demo && ant debug
68 test -f orte/contrib/Robot_Demo/bin/RoboDruid-debug.apk
71 $(MAKE) -f Makefile.git VER=$(VER) dist-tarball dist-check
72 @echo "Tarball stored as orte-$(VER).tar.gz"
74 dist-tarball: orte-$(VER).tar.gz
76 orte-$(VER).tar.gz: $(shell git ls-files)
77 # Export clean sources and run autoreconf
79 git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
80 make -C orte-$(VER) -f Makefile.git
81 rm -rf orte-$(VER)/autom4te.cache
82 # Export sources again for building of documentation and copy generated orte manual to release dir
83 test ! -d orte-$(VER)-doc
84 git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
85 make -C orte-$(VER)-doc/doc
86 cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
87 rm -rf orte-$(VER)-doc
89 tar czf $@ orte-$(VER)
91 @echo "Tarball stored as orte-$(VER).tar.gz"
93 dist-check: orte-$(VER).tar.gz
95 # Check that we can compile the content of the tarball
96 mkdir orte-$(VER)/_build
97 cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
98 mkdir orte-$(VER)/_win
99 cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc && make V=0