mainmk_build_dynamic.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk
  2. --- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000
  3. +++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000
  4. @@ -139,7 +139,7 @@
  5. # This is the default Makefile target. The objects listed here
  6. # are what get build when you type just "make" with no arguments.
  7. #
  8. -all: sqlite.h config.h libsqlite.a sqlite$(EXE)
  9. +all: sqlite.h config.h libsqlite.so sqlite$(EXE)
  10. # Generate the file "last_change" which contains the date of change
  11. # of the most recently modified source code file
  12. @@ -148,13 +148,12 @@
  13. cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
  14. | awk '{print $$5,$$6}' >last_change
  15. -libsqlite.a: $(LIBOBJ)
  16. - $(AR) libsqlite.a $(LIBOBJ)
  17. - $(RANLIB) libsqlite.a
  18. -
  19. -sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h
  20. - $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \
  21. - libsqlite.a $(LIBREADLINE) $(THREADLIB)
  22. +libsqlite.so: $(LIBOBJ)
  23. + $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ)
  24. +
  25. +sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h
  26. + $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \
  27. + -lsqlite $(LIBREADLINE) $(THREADLIB)
  28. sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \
  29. $(TOP)/tool/spaceanal.tcl