From ba9a938e36ad3165b4ff155172c9bf33730b6239 Mon Sep 17 00:00:00 2001 From: Luiz Felipe Silva Date: Sat, 3 Mar 2018 08:49:52 -0300 Subject: [PATCH] Removing large number of defines inside makefile, exporting them to a file --- app/sqlite3/Makefile | 79 +--------------------------------------- app/sqlite3/config_ext.h | 77 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 app/sqlite3/config_ext.h diff --git a/app/sqlite3/Makefile b/app/sqlite3/Makefile index 9b144be0..2b5339b4 100644 --- a/app/sqlite3/Makefile +++ b/app/sqlite3/Makefile @@ -15,84 +15,7 @@ ifndef PDIR GEN_LIBS = libsqlite3.a endif -STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -STD_CFLAGS+= -DSQLITE_CORE=1 -STD_CFLAGS+= -DSQLITE_NO_SYNC=1 -STD_CFLAGS+= -DYYSTACKDEPTH=20 -STD_CFLAGS+= -DSQLITE_TEMP_STORE=3 -STD_CFLAGS+= -DBUILD_sqlite -DNDEBUG -STD_CFLAGS+= -DSQLITE_SYSTEM_MALLOC=1 -STD_CFLAGS+= -D_HAVE_SQLITE_CONFIG_H -STD_CFLAGS+= -DSQLITE_OS_OTHER=1 -STD_CFLAGS+= -DSQLITE_THREADSAFE=0 -STD_CFLAGS+= -DSQLITE_MUTEX_APPDEF=1 -STD_CFLAGS+= -DSQLITE_SECURE_DELETE=0 -STD_CFLAGS+= -DSQLITE_DISABLE_LFS=1 -STD_CFLAGS+= -DSQLITE_DISABLE_DIRSYNC=1 -STD_CFLAGS+= -DSQLITE_DISABLE_FTS3_UNICODE=1 -STD_CFLAGS+= -DSQLITE_DISABLE_FTS4_DEFERRED=1 -STD_CFLAGS+= -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -STD_CFLAGS+= -DSQLITE_DEFAULT_CACHE_SIZE=-1 -STD_CFLAGS+= -DSQLITE_DEFAULT_MEMSTATUS=0 -STD_CFLAGS+= -DSQLITE_DEFAULT_MMAP_SIZE=0 -STD_CFLAGS+= -DSQLITE_DEFAULT_LOCKING_MODE=1 -STD_CFLAGS+= -DSQLITE_DEFAULT_LOOKASIDE=512,125 -STD_CFLAGS+= -DSQLITE_DEFAULT_PAGE_SIZE=4096 -STD_CFLAGS+= -DSQLITE_POWERSAFE_OVERWRITE=1 -STD_CFLAGS+= -DSQLITE_MAX_EXPR_DEPTH=0 -STD_CFLAGS+= -DSQLITE_OMIT_ALTERTABLE=1 -STD_CFLAGS+= -DSQLITE_OMIT_ANALYZE=1 -STD_CFLAGS+= -DSQLITE_OMIT_ATTACH=1 -STD_CFLAGS+= -DSQLITE_OMIT_AUTHORIZATION=1 -STD_CFLAGS+= -DSQLITE_OMIT_AUTOINCREMENT=1 -STD_CFLAGS+= -DSQLITE_OMIT_AUTOMATIC_INDEX=1 -STD_CFLAGS+= -DSQLITE_OMIT_AUTORESET=1 -STD_CFLAGS+= -DSQLITE_OMIT_AUTOVACUUM=1 -STD_CFLAGS+= -DSQLITE_OMIT_BETWEEN_OPTIMIZATION=1 -STD_CFLAGS+= -DSQLITE_OMIT_BLOB_LITERAL=1 -STD_CFLAGS+= -DSQLITE_OMIT_BTREECOUNT=1 -STD_CFLAGS+= -DSQLITE_OMIT_BUILTIN_TEST=1 -STD_CFLAGS+= -DSQLITE_OMIT_CAST=1 -STD_CFLAGS+= -DSQLITE_OMIT_CHECK=1 -STD_CFLAGS+= -DSQLITE_OMIT_COMPILEOPTION_DIAGS=1 -STD_CFLAGS+= -DSQLITE_OMIT_COMPOUND_SELECT=1 -STD_CFLAGS+= -DSQLITE_OMIT_CTE=1 -STD_CFLAGS+= -DSQLITE_OMIT_DECLTYPE=1 -STD_CFLAGS+= -DSQLITE_OMIT_DEPRECATED=1 -STD_CFLAGS+= -DSQLITE_OMIT_EXPLAIN=1 -STD_CFLAGS+= -DSQLITE_OMIT_FLAG_PRAGMAS=1 -STD_CFLAGS+= -DSQLITE_OMIT_FOREIGN_KEY=1 -STD_CFLAGS+= -DSQLITE_OMIT_GET_TABLE=1 -STD_CFLAGS+= -DSQLITE_OMIT_INCRBLOB=1 -STD_CFLAGS+= -DSQLITE_OMIT_INTEGRITY_CHECK=1 -STD_CFLAGS+= -DSQLITE_OMIT_LIKE_OPTIMIZATION=1 -STD_CFLAGS+= -DSQLITE_OMIT_LOAD_EXTENSION=1 -STD_CFLAGS+= -DSQLITE_OMIT_LOCALTIME=1 -STD_CFLAGS+= -DSQLITE_OMIT_LOOKASIDE=1 -STD_CFLAGS+= -DSQLITE_OMIT_MEMORYDB=1 -STD_CFLAGS+= -DSQLITE_OMIT_OR_OPTIMIZATION=1 -STD_CFLAGS+= -DSQLITE_OMIT_PAGER_PRAGMAS=1 -STD_CFLAGS+= -DSQLITE_OMIT_PRAGMA=1 -STD_CFLAGS+= -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -STD_CFLAGS+= -DSQLITE_OMIT_QUICKBALANCE=1 -STD_CFLAGS+= -DSQLITE_OMIT_REINDEX=1 -STD_CFLAGS+= -DSQLITE_OMIT_SCHEMA_PRAGMAS=1 -STD_CFLAGS+= -DSQLITE_OMIT_SCHEMA_VERSION_PRAGMAS=1 -STD_CFLAGS+= -DSQLITE_OMIT_SHARED_CACHE=1 -STD_CFLAGS+= -DSQLITE_OMIT_TCL_VARIABLE=1 -STD_CFLAGS+= -DSQLITE_OMIT_TEMPDB=1 -STD_CFLAGS+= -DSQLITE_OMIT_TRACE=1 -STD_CFLAGS+= -DSQLITE_OMIT_TRIGGER=1 -STD_CFLAGS+= -DSQLITE_OMIT_TRUNCATE_OPTIMIZATION=1 -STD_CFLAGS+= -DSQLITE_OMIT_UTF16=1 -STD_CFLAGS+= -DSQLITE_OMIT_VIEW=1 -STD_CFLAGS+= -DSQLITE_OMIT_VIRTUALTABLE=1 -STD_CFLAGS+= -DSQLITE_OMIT_WAL=1 -STD_CFLAGS+= -DSQLITE_OMIT_XFER_OPT=1 -#STD_CFLAGS+= -DSQLITE_OMIT_COMPLETE=1 -#STD_CFLAGS+= -DSQLITE_OMIT_SUBQUERY=1 -#STD_CFLAGS+= -DSQLITE_OMIT_DATETIME_FUNCS=1 -#STD_CFLAGS+= -DSQLITE_OMIT_FLOATING_POINT=1 +STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -include config_ext.h ############################################################# # Configuration i.e. compile options etc. diff --git a/app/sqlite3/config_ext.h b/app/sqlite3/config_ext.h new file mode 100644 index 00000000..5a37200a --- /dev/null +++ b/app/sqlite3/config_ext.h @@ -0,0 +1,77 @@ +#define BUILD_sqlite -DNDEBUG +#define _HAVE_SQLITE_CONFIG_H +#define SQLITE_CORE 1 +#define SQLITE_NO_SYNC 1 +#define YYSTACKDEPTH 20 +#define SQLITE_TEMP_STORE 3 +#define SQLITE_SYSTEM_MALLOC 1 +#define SQLITE_OS_OTHER 1 +#define SQLITE_THREADSAFE 0 +#define SQLITE_MUTEX_APPDEF 1 +#define SQLITE_SECURE_DELETE 0 +#define SQLITE_DISABLE_LFS 1 +#define SQLITE_DISABLE_DIRSYNC 1 +#define SQLITE_DISABLE_FTS3_UNICODE 1 +#define SQLITE_DISABLE_FTS4_DEFERRED 1 +#define SQLITE_LIKE_DOESNT_MATCH_BLOBS 1 +#define SQLITE_DEFAULT_CACHE_SIZE -1 +#define SQLITE_DEFAULT_MEMSTATUS 0 +#define SQLITE_DEFAULT_MMAP_SIZE 0 +#define SQLITE_DEFAULT_LOCKING_MODE 1 +#define SQLITE_DEFAULT_LOOKASIDE 512,125 +#define SQLITE_DEFAULT_PAGE_SIZE 4096 +#define SQLITE_POWERSAFE_OVERWRITE 1 +#define SQLITE_MAX_EXPR_DEPTH 0 +#define SQLITE_OMIT_ALTERTABLE 1 +#define SQLITE_OMIT_ANALYZE 1 +#define SQLITE_OMIT_ATTACH 1 +#define SQLITE_OMIT_AUTHORIZATION 1 +#define SQLITE_OMIT_AUTOINCREMENT 1 +#define SQLITE_OMIT_AUTOMATIC_INDEX 1 +#define SQLITE_OMIT_AUTORESET 1 +#define SQLITE_OMIT_AUTOVACUUM 1 +#define SQLITE_OMIT_BETWEEN_OPTIMIZATION 1 +#define SQLITE_OMIT_BLOB_LITERAL 1 +#define SQLITE_OMIT_BTREECOUNT 1 +#define SQLITE_OMIT_BUILTIN_TEST 1 +#define SQLITE_OMIT_CAST 1 +#define SQLITE_OMIT_CHECK 1 +#define SQLITE_OMIT_COMPILEOPTION_DIAGS 1 +#define SQLITE_OMIT_COMPOUND_SELECT 1 +#define SQLITE_OMIT_CTE 1 +#define SQLITE_OMIT_DECLTYPE 1 +#define SQLITE_OMIT_DEPRECATED 1 +#define SQLITE_OMIT_EXPLAIN 1 +#define SQLITE_OMIT_FLAG_PRAGMAS 1 +#define SQLITE_OMIT_FOREIGN_KEY 1 +#define SQLITE_OMIT_GET_TABLE 1 +#define SQLITE_OMIT_INCRBLOB 1 +#define SQLITE_OMIT_INTEGRITY_CHECK 1 +#define SQLITE_OMIT_LIKE_OPTIMIZATION 1 +#define SQLITE_OMIT_LOAD_EXTENSION 1 +#define SQLITE_OMIT_LOCALTIME 1 +#define SQLITE_OMIT_LOOKASIDE 1 +#define SQLITE_OMIT_MEMORYDB 1 +#define SQLITE_OMIT_OR_OPTIMIZATION 1 +#define SQLITE_OMIT_PAGER_PRAGMAS 1 +#define SQLITE_OMIT_PRAGMA 1 +#define SQLITE_OMIT_PROGRESS_CALLBACK 1 +#define SQLITE_OMIT_QUICKBALANCE 1 +#define SQLITE_OMIT_REINDEX 1 +#define SQLITE_OMIT_SCHEMA_PRAGMAS 1 +#define SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS 1 +#define SQLITE_OMIT_SHARED_CACHE 1 +#define SQLITE_OMIT_TCL_VARIABLE 1 +#define SQLITE_OMIT_TEMPDB 1 +#define SQLITE_OMIT_TRACE 1 +#define SQLITE_OMIT_TRIGGER 1 +#define SQLITE_OMIT_TRUNCATE_OPTIMIZATION 1 +#define SQLITE_OMIT_UTF16 1 +#define SQLITE_OMIT_VIEW 1 +#define SQLITE_OMIT_VIRTUALTABLE 1 +#define SQLITE_OMIT_WAL 1 +#define SQLITE_OMIT_XFER_OPT 1 +/* #define SQLITE_OMIT_COMPLETE 1 */ +/* #define SQLITE_OMIT_SUBQUERY 1 */ +/* #define SQLITE_OMIT_DATETIME_FUNCS 1 */ +/* #define SQLITE_OMIT_FLOATING_POINT 1 */