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
21 check: check-omk check-autotools check-windows check-windows-omk check-java check-android
26 $(MAKE) -C _$@ -f ../Makefile.git $@.real
29 # We don't have libIDL for mingw, so we check without --enable-orte-idl
30 ../configure --prefix=/ --host=i586-mingw32msvc CC=i586-mingw32msvc-gcc || \
31 ../configure --prefix=/ --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc
33 make install DESTDIR=$(CURDIR)/_install
34 test -f _install/bin/liborte-*.dll
36 check-windows-omk.real:
37 echo "TARGET_OS=win32" > config.omk
38 echo "CC=i686-w64-mingw32-gcc" >> config.omk
39 echo "CXX=i686-w64-mingw32-g++" >> config.omk
40 echo "AR=i686-w64-mingw32-ar" >> config.omk
41 echo "LD=i686-w64-mingw32-ld" >> config.omk
42 ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
46 ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
50 ../configure $(CONFIGURE_FLAGS)
53 check-java.real: JAVAC=$(shell readlink -f $(shell which javac))
54 check-java.real: JAVA_HOME=$(JAVAC:%/bin/javac=%)
56 test -d "$(JAVA_HOME)"
57 ../configure --with-java=$(JAVA_HOME)
59 ant -f ../orte/java/build.xml
60 test -f ../orte/java/lib/orte.jar
63 android update project -p orte/libaorte
64 android update project -p orte/contrib/Robot_Demo
65 cd orte/libaorte && ndk-build
66 cd orte/contrib/Robot_Demo && ant debug
67 test -f orte/contrib/Robot_Demo/bin/RoboDruid-debug.apk
70 $(MAKE) -f Makefile.git VER=$(VER) dist-tarball dist-check
71 @echo "Tarball stored as orte-$(VER).tar.gz"
73 dist-tarball: orte-$(VER).tar.gz
75 orte-$(VER).tar.gz: $(shell git ls-files)
76 # Export clean sources and run autoreconf
78 git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
79 make -C orte-$(VER) -f Makefile.git
80 rm -rf orte-$(VER)/autom4te.cache
81 # Export sources again for building of documentation and copy generated orte manual to release dir
82 test ! -d orte-$(VER)-doc
83 git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
84 make -C orte-$(VER)-doc/doc
85 cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
86 rm -rf orte-$(VER)-doc
88 tar czf $@ orte-$(VER)
90 @echo "Tarball stored as orte-$(VER).tar.gz"
92 dist-check: orte-$(VER).tar.gz
94 # Check that we can compile the content of the tarball
95 mkdir orte-$(VER)/_build
96 cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
97 mkdir orte-$(VER)/_win
98 cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc && make V=0