#!/bin/bash # cc5A echo "Compile, link, and place two versions of Mark5A " # See notes in ~jball/C/Parse5A.h # You need root privileges to compile Mark5A, etc. # Revised: 2004 October 22, JAB if [ ` id -u ` != 0 ] ; then echo " You must be root to compile Mark5A, etc. Sorry " exit -1 fi cd ~jball/C echo "Find g++ version and set a symbolic link to that version of libssapi.a " rm libssapi.a if [[ ` g++ --version ` < 3. ]] ; then # gcc version 2.x echo " Found g++ version < 3 " ln -s /home/streamstor/Sdk/lib/gcc_v2/libssapi.a else # gcc version 3.x echo " Found g++ version >= 3 " ln -s /home/streamstor/Sdk/lib/gcc_v3/libssapi.a fi echo "First the version with stubs: Mark5A.stubs " g++ -Wall Mark5A.c Parse5A.c stubs5A.c IOBoard.c ../F/daze.f ../F/dazl.f \ ` glib-config --cflags ` -I. -lpthread -lm chown jball.users a.out mv -f a.out ../bin/Mark5A.stubs echo "Next the version with SS API: Mark5A " # (g++ is required to link with SS) g++ -Wall Mark5A.c Parse5A.c IOBoard.c ../F/daze.f ../F/dazl.f \ ` glib-config --cflags ` -I. -lpthread -L . -lssapi -lm chown root.root a.out chmod 04755 a.out mv -f a.out ../bin/Mark5A echo "Then the test program: tstMark5A " g++ -Wall tstMark5A.c -lreadline -lcurses chown jball.users a.out mv -f a.out ../bin/tstMark5A # echo "Cindy's example " # g++ -Wall example.c -I . -lpthread -L . -lssapi # chown jball.users a.out # mv -f a.out ../bin/example echo "And SSReset " g++ -Wall SSReset.c -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/SSReset # echo "And SSreset " # g++ -Wall SSreset.c -I . -lpthread -L . -lssapi # chown jball.users a.out # mv -f a.out ../bin/SSreset echo "And TVGmTest " g++ -Wall TVGmTest.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/TVGmTest # echo "And WRSpeedTest " # g++ -Wall WRSpeedTest.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi # chown jball.users a.out # mv -f a.out ../bin/WRSpeedTest echo "And IMSpeedTest " g++ -Wall IMSpeedTest.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/IMSpeedTest echo "And tstIn2mem " g++ -Wall tstIn2mem.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/tstIn2mem echo "And SSErase " g++ -Wall SSErase.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/SSErase echo "And Recover " g++ -Wall Recover.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/Recover echo "And SSCopy " g++ -Wall SSCopy.c ` glib-config --cflags ` -I . -lpthread -L . -lssapi chown jball.users a.out mv -f a.out ../bin/SSCopy echo "And Net2file " gcc -Wall Net2file.c # NOT g++ chown jball.users a.out mv -f a.out ../bin/Net2file echo "And File2net " gcc -Wall File2net.c chown jball.users a.out mv -f a.out ../bin/File2net echo "And DirList " g++ -Wall DirList.c ` glib-config --cflags ` -I . chown jball.users a.out mv -f a.out ../bin/DirList echo "And IOBhack " gcc -Wall IOBhack.c chown root.root a.out chmod 04755 a.out mv -f a.out ../bin/IOBhack echo "And LLogr " gcc -Wall LLogr.c chown jball.users a.out mv -f a.out ../bin/LLogr