diff -Nurd -x'*~' gsm-1.0-pl13.orig/Makefile gsm-1.0-pl13/Makefile --- gsm-1.0-pl13.orig/Makefile 2006-04-26 15:14:26.000000000 -0400 +++ gsm-1.0-pl13/Makefile 2011-03-09 01:54:22.000000000 -0500 @@ -43,7 +43,7 @@ # CC = /usr/lang/acc # CCFLAGS = -c -O -CC = gcc -ansi -pedantic +CC = cc -ansi -pedantic CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 LD = $(CC) @@ -80,8 +80,8 @@ GSM_INSTALL_ROOT = $(INSTALL_ROOT) GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib -GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc -GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3 +GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include +GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3 # Where do you want to install the toast binaries and their manpage? @@ -91,7 +91,7 @@ TOAST_INSTALL_ROOT = $(INSTALL_ROOT) TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin -TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1 +TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1 # Other tools @@ -100,7 +100,7 @@ BASENAME = basename AR = ar ARFLAGS = cr -RMFLAGS = +RMFLAGS = -f FIND = find COMPRESS = compress COMPRESSFLAGS = @@ -139,7 +139,7 @@ # Targets -LIBGSM = $(LIB)/libgsm.a +LIBGSM = $(LIB)/libgsm.1.dylib TOAST = $(BIN)/toast UNTOAST = $(BIN)/untoast @@ -257,7 +257,8 @@ # Install targets GSM_INSTALL_TARGETS = \ - $(GSM_INSTALL_LIB)/libgsm.a \ + $(GSM_INSTALL_LIB)/libgsm.1.dylib \ + $(GSM_INSTALL_LIB)/libgsm.dylib \ $(GSM_INSTALL_INC)/gsm.h \ $(GSM_INSTALL_MAN)/gsm.3 \ $(GSM_INSTALL_MAN)/gsm_explode.3 \ @@ -301,8 +302,7 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS) -rm $(RMFLAGS) $(LIBGSM) - $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) - $(RANLIB) $(LIBGSM) + $(LD) -dynamiclib -o $(LIBGSM) $(GSM_OBJECTS) -install_name $(INSTALL_ROOT)/lib/libgsm.1.dylib -compatibility_version 2.0.0 # Toast, Untoast and Tcat -- the compress-like frontends to gsm. @@ -332,12 +332,17 @@ gsminstall: -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \ - make $(GSM_INSTALL_TARGETS) ; \ + if [ ! -d $(GSM_INSTALL_INC) ] ; then mkdir -p $(GSM_INSTALL_INC) ; fi; \ + if [ ! -d $(GSM_INSTALL_LIB) ] ; then mkdir -p $(GSM_INSTALL_LIB) ; fi; \ + if [ ! -d $(GSM_INSTALL_MAN) ] ; then mkdir -p $(GSM_INSTALL_MAN) ; fi; \ + make $(GSM_INSTALL_TARGETS) INSTALL_ROOT=$(INSTALL_ROOT); \ fi toastinstall: -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \ - make $(TOAST_INSTALL_TARGETS); \ + if [ ! -d $(TOAST_INSTALL_BIN) ] ; then mkdir -p $(TOAST_INSTALL_BIN) ; fi; \ + if [ ! -d $(TOAST_INSTALL_MAN) ] ; then mkdir -p $(TOAST_INSTALL_MAN) ; fi; \ + make $(TOAST_INSTALL_TARGETS) INSTALL_ROOT=$(INSTALL_ROOT); \ fi gsmuninstall: @@ -351,53 +356,56 @@ fi $(TOAST_INSTALL_BIN)/toast: $(TOAST) - -rm $@ + -rm $(RMFLAGS) $@ cp $(TOAST) $@ chmod 755 $@ $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast - -rm $@ + -rm $(RMFLAGS) $@ ln $? $@ $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast - -rm $@ + -rm $(RMFLAGS) $@ ln $? $@ $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1 - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3 - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3 - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3 - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3 - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h - -rm $@ + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ -$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM) - -rm $@ +$(GSM_INSTALL_LIB)/libgsm.1.dylib: $(LIBGSM) + -rm $(RMFLAGS) $@ cp $? $@ chmod 444 $@ +$(GSM_INSTALL_LIB)/libgsm.dylib: $(LIBGSM) + -rm $(RMFLAGS) $@ + $(LN) -s libgsm.1.dylib $@ # Distribution