Skip to content

Commit

Permalink
Add linux build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Aas committed Nov 26, 2013
1 parent 0bb1ab5 commit 888073a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions build-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This script will build all of the binary encoders and decoders included with
# the test harness, provided you have the required libraries installed at the
# correct locations. Tweaking may be required.

cd encoders
echo "Compiling yuvjpeg..."
gcc yuvjpeg.c -std=c99 -ljpeg -o yuvjpeg || { echo 'Failed!' ; exit 1; }
echo "Compiling yuvjxr..."
gcc yuvjxr.c -I../../jxrlib/jxrtestlib -I../../jxrlib/common/include -I../../jxrlib/jxrgluelib -I../../jxrlib/image/sys -D__ANSI__ -o yuvjxr -L../../jxrlib -ljxrglue -ljpegxr -lm || { echo 'Failed!' ; exit 1; }
echo "Compiling yuvwebp..."
gcc yuvwebp.c -o yuvwebp -std=c99 -I../../libwebp-0.3.1/src/ -L../../libwebp-0.3.1/src/ -lwebp -lm -pthread || { echo 'Failed!' ; exit 1; }
cd ..

cd decoders
echo "Compiling jpegyuv..."
gcc jpegyuv.c -std=c99 -ljpeg -o jpegyuv || { echo 'Failed!' ; exit 1; }
echo "Compiling jxryuv..."
gcc jxryuv.c -o jxryuv -I../../jxrlib/jxrtestlib -I../../jxrlib/common/include -I../../jxrlib/jxrgluelib -I../../jxrlib/image/sys -D__ANSI__ -L../../jxrlib -ljxrglue -ljpegxr -lm || { echo 'Failed!' ; exit 1; }
echo "Compiling webpyuv..."
gcc webpyuv.c -o webpyuv -std=c99 -I../../libwebp-0.3.1/src/ -L../../libwebp-0.3.1/src/ -lwebp -lm -pthread || { echo 'Failed!' ; exit 1; }
cd ..

cd tests/rgbssim
echo "Compiling rgbssim..."
g++ rgbssim.cpp -O2 -o rgbssim -I/usr/include/opencv -I/usr/include/opencv2/highgui -lopencv_core -lopencv_imgproc -lopencv_highgui || { echo 'Failed!' ; exit 1; }
cd ../..

cd tests/dssim
echo "Compiling dssim..."
g++ dssim.cpp -O2 -o dssim -I/usr/include/opencv -I/usr/include/opencv2/highgui -lopencv_core -lopencv_imgproc -lopencv_highgui || { echo 'Failed!' ; exit 1; }
cd ../..

echo "Success building all encoders and decoders."
exit 0
2 changes: 1 addition & 1 deletion tests/dssim/dssim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/

#include <cv.h>
#include <highgui.h>
#include <highgui_c.h>
#include <iostream>
#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion tests/rgbssim/rgbssim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

#include <cv.h>
#include <highgui.h>
#include <highgui_c.h>
#include <iostream>

using namespace std;
Expand Down

0 comments on commit 888073a

Please sign in to comment.