gsm-shared.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. --- Makefile 2006-04-26 15:14:26.000000000 -0400
  2. +++ Makefile 2010-06-19 16:53:25.000000000 -0400
  3. @@ -96,11 +96,11 @@
  4. # Other tools
  5. SHELL = /bin/sh
  6. -LN = ln
  7. +LN = ln -s -f
  8. BASENAME = basename
  9. AR = ar
  10. ARFLAGS = cr
  11. -RMFLAGS =
  12. +RMFLAGS = -f
  13. FIND = find
  14. COMPRESS = compress
  15. COMPRESSFLAGS =
  16. @@ -139,7 +139,7 @@
  17. # Targets
  18. -LIBGSM = $(LIB)/libgsm.a
  19. +LIBGSMSO = $(LIB)/libgsm.so
  20. TOAST = $(BIN)/toast
  21. UNTOAST = $(BIN)/untoast
  22. @@ -257,7 +257,7 @@
  23. # Install targets
  24. GSM_INSTALL_TARGETS = \
  25. - $(GSM_INSTALL_LIB)/libgsm.a \
  26. + $(GSM_INSTALL_LIB)/libgsm.so \
  27. $(GSM_INSTALL_INC)/gsm.h \
  28. $(GSM_INSTALL_MAN)/gsm.3 \
  29. $(GSM_INSTALL_MAN)/gsm_explode.3 \
  30. @@ -279,7 +279,7 @@
  31. # Target rules
  32. -all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
  33. +all: $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
  34. @-echo $(ROOT): Done.
  35. tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
  36. @@ -299,24 +299,23 @@
  37. # The basic API: libgsm
  38. -$(LIBGSM): $(LIB) $(GSM_OBJECTS)
  39. - -rm $(RMFLAGS) $(LIBGSM)
  40. - $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
  41. - $(RANLIB) $(LIBGSM)
  42. -
  43. +$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
  44. + $(LD) -shared -Wl,-soname,libgsm.so.1 -o $@.1.0.13 $(GSM_OBJECTS)
  45. + $(LN) libgsm.so.1.0.13 $(LIBGSMSO).1
  46. + $(LN) libgsm.so.1.0.13 $(LIBGSMSO)
  47. # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
  48. -$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
  49. - $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
  50. +$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSMSO)
  51. + $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
  52. $(UNTOAST): $(BIN) $(TOAST)
  53. -rm $(RMFLAGS) $(UNTOAST)
  54. - $(LN) $(TOAST) $(UNTOAST)
  55. + $(LN) toast $(UNTOAST)
  56. $(TCAT): $(BIN) $(TOAST)
  57. -rm $(RMFLAGS) $(TCAT)
  58. - $(LN) $(TOAST) $(TCAT)
  59. + $(LN) toast $(TCAT)
  60. # The local bin and lib directories
  61. @@ -351,53 +350,54 @@
  62. fi
  63. $(TOAST_INSTALL_BIN)/toast: $(TOAST)
  64. - -rm $@
  65. + -rm $(RMFLAGS) $@
  66. cp $(TOAST) $@
  67. chmod 755 $@
  68. $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
  69. - -rm $@
  70. - ln $? $@
  71. + -rm $(RMFLAGS) $@
  72. + $(LN) toast $@
  73. $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
  74. - -rm $@
  75. - ln $? $@
  76. + -rm $(RMFLAGS) $@
  77. + $(LN) toast $@
  78. $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
  79. - -rm $@
  80. + -rm $(RMFLAGS) $@
  81. cp $? $@
  82. chmod 444 $@
  83. $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
  84. - -rm $@
  85. + -rm $(RMFLAGS) $@
  86. cp $? $@
  87. chmod 444 $@
  88. $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
  89. - -rm $@
  90. + -rm $(RMFLAGS) $@
  91. cp $? $@
  92. chmod 444 $@
  93. $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
  94. - -rm $@
  95. + -rm $(RMFLAGS) $@
  96. cp $? $@
  97. chmod 444 $@
  98. $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
  99. - -rm $@
  100. + -rm $(RMFLAGS) $@
  101. cp $? $@
  102. chmod 444 $@
  103. $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
  104. - -rm $@
  105. - cp $? $@
  106. - chmod 444 $@
  107. -
  108. -$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
  109. - -rm $@
  110. + -rm $(RMFLAGS) $@
  111. cp $? $@
  112. chmod 444 $@
  113. +$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO)
  114. + -rm $(RMFLAGS) $@ $@.1 $@.1.0.13
  115. + cp $?.1.0.13 $@.1.0.13
  116. + chmod 755 $@.1.0.13
  117. + $(LN) libgsm.so.1.0.13 $@
  118. + $(LN) libgsm.so.1.0.13 $@.1
  119. # Distribution
  120. @@ -425,7 +425,7 @@
  121. -print | xargs rm $(RMFLAGS)
  122. clean: semi-clean
  123. - -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
  124. + -rm $(RMFLAGS) $(LIBGSMSO)* $(ADDTST)/add \
  125. $(TOAST) $(TCAT) $(UNTOAST) \
  126. $(ROOT)/gsm-1.0.tar.Z
  127. @@ -473,22 +473,22 @@
  128. $(TST)/test-result: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/run
  129. ( cd $(TST); ./run )
  130. -$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSM)
  131. +$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSMSO)
  132. $(LD) $(LFLAGS) -o $(TST)/lin2txt \
  133. - $(TST)/lin2txt.o $(LIBGSM) $(LDLIB)
  134. + $(TST)/lin2txt.o $(LIBGSMSO) $(LDLIB)
  135. -$(TST)/lin2cod: $(TST)/lin2cod.o $(LIBGSM)
  136. +$(TST)/lin2cod: $(TST)/lin2cod.o $(LIBGSMSO)
  137. $(LD) $(LFLAGS) -o $(TST)/lin2cod \
  138. - $(TST)/lin2cod.o $(LIBGSM) $(LDLIB)
  139. + $(TST)/lin2cod.o $(LIBGSMSO) $(LDLIB)
  140. -$(TST)/gsm2cod: $(TST)/gsm2cod.o $(LIBGSM)
  141. +$(TST)/gsm2cod: $(TST)/gsm2cod.o $(LIBGSMSO)
  142. $(LD) $(LFLAGS) -o $(TST)/gsm2cod \
  143. - $(TST)/gsm2cod.o $(LIBGSM) $(LDLIB)
  144. + $(TST)/gsm2cod.o $(LIBGSMSO) $(LDLIB)
  145. -$(TST)/cod2txt: $(TST)/cod2txt.o $(LIBGSM)
  146. +$(TST)/cod2txt: $(TST)/cod2txt.o $(LIBGSMSO)
  147. $(LD) $(LFLAGS) -o $(TST)/cod2txt \
  148. - $(TST)/cod2txt.o $(LIBGSM) $(LDLIB)
  149. + $(TST)/cod2txt.o $(LIBGSMSO) $(LDLIB)
  150. -$(TST)/cod2lin: $(TST)/cod2lin.o $(LIBGSM)
  151. +$(TST)/cod2lin: $(TST)/cod2lin.o $(LIBGSMSO)
  152. $(LD) $(LFLAGS) -o $(TST)/cod2lin \
  153. - $(TST)/cod2lin.o $(LIBGSM) $(LDLIB)
  154. + $(TST)/cod2lin.o $(LIBGSMSO) $(LDLIB)