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