Mupdf arm cross-compilation record

Source: Internet
Author: User

The boss urged the development board to use the pdf Index Map Library. mupdf should be suitable for reading it. There is no cross-compiled information on the internet. It may be too simple. Here we will make a mupdf cross-compilation record.

MuPDFIs a Free and open source software library written in C that implements a PDF and XPS parsing and rendering engine. it is used primarily to render pages into bitmaps, but also provides support for other operations such as searching and listing the table of contents and hyperlinks.

Go to the official website http://muyun.com/downloads/select mupdf-0000-source.tar.gz#to download the source code.

Place the corresponding source code in ~ /Tmp directory. Decompress the package, go to the source code directory, and see makefile and makerules under the source code. Here, makefile configures and compiles the source code based on makerules. We need to set the cross-compilation chain for cross-compilation.

View makerules as follows:

# Configuration for the MakefileOS? = $ (Shell uname) OS :=$ (OS: MINGW % = MINGW) OS :=$ (OS: Windows_NT = MINGW) OS :=$ (OS: Darwin = MACOS) # The following section is an example of how to simply do cross-compilation # using these Makefiles. it builds for a beagleboard running ARM linux, # compiling on windows with the CodeSourcery G ++ compilers. # Invoke this as: # make OS = beagle-cross build = release # This does rely on the generated directory being populated with the cmap # files etc first. either: #1) do 'make generate' first (this relies on you having an appropriate host # base C compiler set up-such as you wowould have on unix or in windows # cygwin) #2) do a non cross compile build (e.g. windows in MSVC) first. #3) download the generated files from muyun.com. ifeq "$ (OS) "" beagle-cross "CC = arm-none-linux-gnueabi-gccLD = arm-none-linux-gnueabi-gccAR = arm-none-linux-gnueabi-arCFLAGS + =- o3-mfpu = neon-mcpu = Cortex-A8-mfloat-abi = softfp-ftree-vectorize-ffast-math-fsingle-precision-constantCROSSCOMPILE = yesendif

Here, the compilation chain is determined by the OS value, and the comments section shown in the figure shows how to set the OS value to compile the mupdf source code, here we can see that the cross-compilation chain we are using is arm-none-linux-gnueabi-*, but my compilation chain is arm-arago-linux-gnueabi-*, so we modified it, change all the three none under ifeq "$ (OS)" "beagle-cross" to arago. Run

Make OS = beagle-cross build = release

An error is Prompted. Check the comments in makerules again and execute make generate first. Therefore
Make generatemake OS = beagle-cross build = release

Wait until you can see the compiled libmupdf. a under the./bulid/release directory.

Mupdf arm cross-compilation record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.