libpdb-991112-dynlib+flags.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Makefile | 17 +++++++++++------
  2. 1 file changed, 11 insertions(+), 6 deletions(-)
  3. diff --git a/Makefile b/Makefile
  4. index 760a427..de7e724 100644
  5. --- a/Makefile
  6. +++ b/Makefile
  7. @@ -8,16 +8,16 @@
  8. # RANLIB should be ':'
  9. #
  10. SHELL = /bin/sh
  11. -RANLIB = :
  12. +#RANLIB = :
  13. NOTHING =
  14. LINTOPT = -o $(NOTHING)
  15. OPT = -O -g
  16. DEBUG =
  17. -CFLAGS = $(OPT) $(DEBUG)
  18. +CFLAGS += -fPIC
  19. LIBRARY = pdb
  20. -LIBARCH = lib$(LIBRARY).a
  21. +LIBARCH = lib$(LIBRARY)
  22. LINTLIB = llib-l$(LIBRARY).ln
  23. OBJS = pdb_read.o pdb_sprntf.o pdb_sscanf.o pdb_write.o pdbrun.o ms.o
  24. SRCS = pdb_read.c pdb_sprntf.c pdb_sscanf.c pdb_write.c pdbrun.c ms.c
  25. @@ -27,10 +27,15 @@ all: $(LIBARCH) $(LINTLIB)
  26. install: $(LIBARCH)
  27. install -F /usr/local/lib $(LIBARCH)
  28. -$(LIBARCH): $(OBJS)
  29. +$(LIBARCH).so: $(OBJS)
  30. + $(CC) $(LDFLAGS) -shared -Wl,--soname,libpdb.so.0 -o libpdb.so.0.1 $(OBJS)
  31. + ln -sf libpdb.so.0.1 libpdb.so.0
  32. + ln -sf libpdb.so.0.1 libpdb.so
  33. +
  34. +$(LIBARCH).a: $(OBJS)
  35. @echo "Loading $(LIBARCH) ... "
  36. - @ar cru $(LIBARCH) $(OBJS)
  37. - @$(RANLIB) $(LIBARCH)
  38. + $(AR) cru $@ $(OBJS)
  39. + $(RANLIB) $@
  40. @echo "done"
  41. $(LINTLIB): $(SRCS) $(HDRS)