Last active
December 18, 2015 20:29
-
-
Save dholm/5840964 to your computer and use it in GitHub Desktop.
Builds gsm as a dynamic library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: <jochen@scram.de> | |
Subject: New patch generated from libgsm 1.0.10-14 diff.gz | |
diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile | |
--- libgsm-1.0.12~/Makefile 2007-11-01 15:37:52.000000000 +0100 | |
+++ libgsm-1.0.12/Makefile 2007-11-01 15:43:06.000000000 +0100 | |
@@ -96,7 +96,7 @@ | |
# Other tools | |
SHELL = /bin/sh | |
-LN = ln | |
+LN = ln -s | |
BASENAME = basename | |
AR = ar | |
ARFLAGS = cr | |
@@ -140,6 +140,7 @@ | |
# Targets | |
LIBGSM = $(LIB)/libgsm.a | |
+LIBGSMSO= $(LIB)/libgsm.1.0.13.dylib | |
TOAST = $(BIN)/toast | |
UNTOAST = $(BIN)/untoast | |
@@ -279,7 +280,7 @@ | |
# Target rules | |
-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST) | |
+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) | |
@-echo $(ROOT): Done. | |
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result | |
@@ -299,6 +300,11 @@ | |
# The basic API: libgsm | |
+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS) | |
+ $(LD) -o $(LIBGSMSO) -dynamiclib -Wl,-compatibility_version,1,-current_version,1.0.13,-install_name,$(LIBGSMSO) $(GSM_OBJECTS) -lc | |
+ ln -fs libgsm.1.0.13.dylib lib/libgsm.1.dylib | |
+ ln -fs libgsm.1.0.13.dylib lib/libgsm.dylib | |
+ | |
$(LIBGSM): $(LIB) $(GSM_OBJECTS) | |
-rm $(RMFLAGS) $(LIBGSM) | |
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) | |
@@ -308,15 +314,15 @@ | |
# Toast, Untoast and Tcat -- the compress-like frontends to gsm. | |
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) | |
- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB) | |
+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB) | |
$(UNTOAST): $(BIN) $(TOAST) | |
-rm $(RMFLAGS) $(UNTOAST) | |
- $(LN) $(TOAST) $(UNTOAST) | |
+ $(LN) toast $(UNTOAST) | |
$(TCAT): $(BIN) $(TOAST) | |
-rm $(RMFLAGS) $(TCAT) | |
- $(LN) $(TOAST) $(TCAT) | |
+ $(LN) toast $(TCAT) | |
# The local bin and lib directories | |
@@ -426,7 +432,9 @@ | |
clean: semi-clean | |
-rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \ | |
- $(TOAST) $(TCAT) $(UNTOAST) \ | |
+ $(LIBGSMSO) $(LIB)/libgsm.1.dylib \ | |
+ $(LIB)/libgsm.dylib \ | |
+ $(TOAST) $(TCAT) $(UNTOAST) \ | |
$(ROOT)/gsm-1.0.tar.Z | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment