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

Generated by cgit