SQLite Forum

Need help building a custom amalgamation
Login
> I then run make sqlite3.c inside the build directory where the Makefile is and end up with a sqlite3.c file that is around 8.1 MB.

Are you concerned about source code size, or object code size?  Those are
independent variables.

I was under the impression that you were concerned mostly about object code
size - the space consumed on the embedded device. Am I wrong? The source-code size
does not really matter in that case.  All of your OMIT options will cause
much of that 8.1MB of sqlite3.c source to be commented out.  The object code,
which is what uses memory on your device, should be less than 500KB.

Note further that the amount of memory that a library uses is not the same
as the size of the *.o file for the compiled library.  The *.o file contains
a lot of other stuff that may or may not get loaded into memory when the
program runs.  To find the amount of memory that the library will use,
run the "size" command on the *.o file:

~~~~
    size sqlite3.o
~~~~

Probably it is the output of the "size" command that you are concerned about.
The number of bytes of source code and the number of bytes in the *.o file
are correlated to the amount of memory used, but only loosely so.  So you
cannot use the source code and *.o file sizes as definitive measurements
of memory usage on the device.