Porting completed (demo VFS adapted for KolibriOS).
Now it can be used)

git-svn-id: svn://kolibrios.org@8931 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat
2021-06-23 21:46:56 +00:00
parent 5f997bdf39
commit 8e0821a737
5 changed files with 618 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ LD = kos32-ld
SDK_DIR = $(abspath ../../../../sdk)
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DSQLITE_OS_OTHER=1 -DHAVE_UNISTD_H=0 -DSQLITE_OMIT_POPEN -DSQLITE_THREADSAFE=0 -D_KOLIBRI -U__linux__ -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.36.0\" -DPACKAGE_STRING=\"sqlite\ 3.36.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.36.0\"
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DSQLITE_OS_OTHER=1 -DHAVE_UNISTD_H=0 -D_NO_STDERR -DSQLITE_OMIT_POPEN -DSQLITE_THREADSAFE=0 -D_KOLIBRI -U__linux__ -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.36.0\" -DPACKAGE_STRING=\"sqlite\ 3.36.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.36.0\"
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I..
@@ -11,16 +11,16 @@ LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib -L..
# Only selected
SRC = test.c stub.c
SRC = shell.c stub.c
# All .c files
# SRC = $(notdir $(wildcard *.c))
OBJECTS = $(patsubst %.c, %.o, $(SRC))
default: $(patsubst %.c,%.o,$(SRC))
kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o slite3_shell $(OBJECTS) -lgcc -lsqlite3.dll -lc.dll
strip -S slite3_shell
objcopy slite3_shell -O binary
kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o sqlite3 $(OBJECTS) -lgcc -lsqlite3.dll -lc.dll
strip -S sqlite3
objcopy sqlite3 -O binary
%.o : %.c Makefile $(SRC)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<

View File

@@ -21007,12 +21007,14 @@ static char *cmdline_option_value(int argc, char **argv, int i){
# endif
#endif
#if SQLITE_SHELL_IS_UTF8
int SQLITE_CDECL main(int argc, char **argv){
#else
int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
char **argv;
#endif
con_init_opt(-1,-1,-1,-1, "SQLite3");
char *zErrMsg = 0;
ShellState data;
const char *zInitFile = 0;