Subversion Repositories Kolibri OS

Rev

Rev 8760 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. LIBRARY= libsqlite3
  2.  
  3. CC = kos32-gcc
  4. AR = kos32-ar
  5. LD = kos32-ld
  6. STRIP = kos32-strip
  7.  
  8. INSTALLDIR ?= /home/autobuild/tools/win32/lib
  9.  
  10. CFLAGS = -U__MINGW32__ -UWIN32 -UWindows -U_WINDOWS -U_WIN32 -U__WIN32__ -U_WIN32 -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\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=0 -DHAVE_USLEEP=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_EDITLINE=1 -DHAVE_ZLIB_H=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_OS_OTHER=1 -USQLITE_OS_WIN_H -DSQLITE_TEMP_STORE=3 -D_NO_STDERR -c -O2 -fomit-frame-pointer -D_KOLIBRI
  11.  
  12. LDFLAGS=$(LDFLAGS_CMD)
  13. LDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0
  14. LDFLAGS+=  --out-implib $(LIBRARY).dll.a
  15. ARFLAGS:= crs
  16. INCLUDES= -I. -I../newlib/libc/include
  17. LIBS:=  -ldll -lgcc -lc.dll
  18.  
  19. SOURCES = sqlite3.c kolibri_vfs.c
  20. OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
  21.  
  22. all:$(LIBRARY).a $(LIBRARY).dll
  23.  
  24. $(LIBRARY).a: $(OBJECTS) Makefile
  25.         $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS)
  26.         mv -f $(LIBRARY).a $(INSTALLDIR)
  27.  
  28. $(LIBRARY).dll: sqlite3.def $(OBJECTS) Makefile
  29.         $(LD) $(LDFLAGS) -o $@  sqlite3.def $(OBJECTS) $(LIBS)
  30.         $(STRIP) -S $@
  31.         #mv -f $(LIBRARY).dll.a $(INSTALLDIR)
  32.  
  33.  
  34. %.o : %.c Makefile
  35.         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
  36.        
  37. clean:
  38.         -rm -f *.o
  39.