capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.

Home Page:http://www.capstone-engine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build system discussion

Rot127 opened this issue · comments

We mentioned here and there that the Makefile build is considered deprecated and should be removed. Though it was never really discussed or tracked somewhere.

Supporting only cmake is indeed maybe not enough(?). We could add support for other build systems. Meson, Bazel?

Personally I am still in favor of deprecating the Makefile way. Its pretty messy IMHO.

Thoughts, objections etc. are very welcome.

There's a shift of moving to new build infrastructure, away from the traditional Makefile or autotools infra, whether it's to get away from perceived arcaneness or lack of performance. The thing is that the usual pick of the mix build tools that are currently in flavour have much higher dependency requirement than the code base they're actually used to build. I am capable of build this project with a C compiler which supports C99 + a copy of make. As an example for cmake and such I would need a much newer compiler (with C++11 support) + its dependencies. You could make the argument that I've gone off into the weeds and a current system not only would have the language support but would have everything ready to set off and that's true however such tooling imposes that only current mainstream systems are used because anything fringe will be very hard or impossible.
I would suggest the support of both legacy make infra is maintained as a fall through for the fringe, armed with a C99 compiler & make to be able to build capstone alongside modern build infra. That should help also clarify what is required to build the project.
If you need a hand, I'm happy to add autotools support as well.

Makefile in its current form is undoubtedly a pain to maintain and improve. I think having just CMake in the near future is enough. Supporting both Meson and CMake at the same time could be problematic. As for Bazel - I don't see many requests for it just yet.