SQLite Forum

Need help building a custom amalgamation
Login
> I'm very new to makefiles and compiling libraries

This is an absolutely foundational skill as a software developer, particularly to one doing anything "embedded." You cannot excuse the lack of this skill if you want to push forward. Get it done.

As well, your question does not show any evidence that you've even found [the front page of the software project][1] yet. If you had, you would already have an amalgamation and would now be asking how you can get it from X bytes to X÷M bytes, where M is your desired reduction factor > 1.

> I want a VERY minimum sized sqlite library

Quantify that. At the very least, give me X and M above.

> in an embedded system. 

Your question is couched in terms of resource capacity problems, but "embedded" tells us *nothing* about what those resource requirements are. I can make a case for a 4-CPU 28-core-per 1 TB RAM monstrosity being used as an "embedded" system, since that word has more to do with deployment and management than it does with resource requirements.

If you think I'm picking ridiculous examples to make a point, you're right, but then answer me this: is a Raspberry Pi "embedded"? And if you can imagine cases where the answer is "yes," as I can, then how do you make any sense of your question given that SQLite rattles around like a pebble in a milk jug in relative terms to a Raspberry Pi's resource space?

> The only commands I will be running are sqlite3_open() sqlite3_close and sqlite3_exec()

...which drags in the SQL parser, which drags in the VFS layer, which drags in the memory manager...

There are large chunks of SQLite you can leave out with [`OMIT` options and such][2], but there is a definite lower limit to how far you can take this. But again, you have given us no limits, so we cannot evaluate whether any extra work is needed.


[1]: https://sqlite.org/src/
[2]: https://sqlite.org/compile.html