1

I need to build libjpeg-turbo library which is from android AOSP.

The repository contains this Android.bp file, and i have no idea how to build it. Before this, all of the libraries i've built had Android.mk file inside JNI folder and for the building i was using ndk-build command. How can i succesfully build this library?

Hamid Yusifli
  • 9,688
  • 2
  • 24
  • 48

1 Answers1

2

Some while ago, NDK and AOSP configuration scripts (Android.mk) looked very similar. Historically, NDK used the AOSP build system (based on GNU make). Since these early days, evolution of the two build systems went in different directions, and culminated in recent switch of AOSP to blueprint build system.

But even before this, you could use ndk-build with AOSP Android.mk files only occasionally. Many libraries, especially libraries with dependencies, could not be built this way.

Luckily, libjpeg-turbo is one of the subprojects of AOSP that don't have problematic dependencies. If you step back in git history for this library, you will be able to build it with ndk-build. You can even cherry-pick the relevant changes to your NDK-compatible branch.

Alternatively, you can use the official libjpeg-turbo repository instead of AOSP tree.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307