Onega

a lot of VC++ posts, a few C# posts, and some miscellaneous stuff

Friday, December 28, 2012

Build ACE+TAO-6.1.6.tar.bz2 as static library on CentOS 5.6

### For my own notes, here is a script to build ACE+TAO-6.1.6.tar.bz2 as static library on CentOS 5.6
#tar xvjf /mnt/host_c/Users/onega/Downloads/ACE+TAO-6.1.6.tar.bz2

export ACE_ROOT=~/workspace/ACE_wrappers
echo '#include "ace/config-linux.h"' > $ACE_ROOT/ace/config.h
rm $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'shared_libs=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs_only=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'no_hidden_visibility=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'debug=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'ACE_COMPONENTS=FOR_TAO' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'shared_libs=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'static_libs_only=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'no_hidden_visibility=1' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'debug=0' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo 'ACE_COMPONENTS=FOR_TAO' >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
cd $ACE_ROOT/ace
make clean ; time make
cd $ACE_ROOT/apps/gperf/src ; time make  >> $ACE_ROOT/tao-dll-release.txt
export TAO_ROOT=$ACE_ROOT/TAO
export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
cd $TAO_ROOT/TAO_IDL ; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/tao ;make clean; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/orbsvcs ; time make   >> $ACE_ROOT/tao-dll-release.txt
cd $TAO_ROOT/examples/Simple/echo; time make >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $ACE_ROOT/ace/libACE.a >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/tao/libTAO.a >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $ACE_ROOT/ace/libACE.so.* >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/tao/libTAO.so.* >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/TAO_IDL/tao_idl >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/examples/Simple/echo/client >> $ACE_ROOT/tao-dll-release.txt
ls -hgo $TAO_ROOT/examples/Simple/echo/server >> $ACE_ROOT/tao-dll-release.txt

###########################################################################
Define two macros in your own project.
-DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS
TAO libraries must be linked in correct order.
g++ -O3 -pthread -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0  -DNDEBUG  -I/home/onega/workspace/ACE_wrappers -DACE_NDEBUG -D__ACE_INLINE__ -I../../../.. -I../../.. -I../../../orbsvcs -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS  -L/home/onega/workspace/ACE_wrappers/lib -L.  -L../../../../lib  -o server .obj/Echo_i.o .obj/Simple_util.o .obj/server.o .obj/EchoS.o .obj/EchoC.o -lTAO_Utils -lTAO_PI -lTAO_CodecFactory -lTAO_PortableServer -lTAO_IORTable -lTAO_CosNaming -lTAO_AnyTypeCode -lTAO -lACE -ldl -lrt

0 Comments:

Post a Comment

<< Home