blob: 60aa78d66056d2cda93948716bd0e653689e8f1a [file] [log] [blame]
Fabio Bertonefa58492015-10-26 13:22:07 -02001Upstream-Status: Inappropriate [configuration]
2
3Subject: [PATCH 1/5] Configure Makefile
4Organization: O.S. Systems Software LTDA.
5
6Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
7---
8 Makefile | 20 ++++++++++++++------
9 1 file changed, 14 insertions(+), 6 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index cfab74f..410d3f6 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -96,7 +96,7 @@ TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080016 # Other tools
17
18 SHELL = /bin/sh
19-LN = ln
20+LN = ln -s
21 BASENAME = basename
22 AR = ar
23 ARFLAGS = cr
Fabio Bertonefa58492015-10-26 13:22:07 -020024@@ -140,6 +140,7 @@ LFLAGS = $(LDFLAGS) $(LDINC)
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080025 # Targets
26
27 LIBGSM = $(LIB)/libgsm.a
Fabio Bertonefa58492015-10-26 13:22:07 -020028+LIBGSMSO = $(LIB)/libgsm.so
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080029
30 TOAST = $(BIN)/toast
31 UNTOAST = $(BIN)/untoast
Fabio Bertonefa58492015-10-26 13:22:07 -020032@@ -279,7 +280,7 @@ TOAST_INSTALL_TARGETS = \
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080033
34 # Target rules
35
36-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
37+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
38 @-echo $(ROOT): Done.
39
40 tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
Fabio Bertonefa58492015-10-26 13:22:07 -020041@@ -299,6 +300,11 @@ install: toastinstall gsminstall
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080042
43 # The basic API: libgsm
44
45+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
46+ $(LD) -o $@.1.0.12 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc $(LDFLAGS)
47+ ln -fs libgsm.so.1.0.12 lib/libgsm.so.1
48+ ln -fs libgsm.so.1.0.12 lib/libgsm.so
49+
50 $(LIBGSM): $(LIB) $(GSM_OBJECTS)
51 -rm $(RMFLAGS) $(LIBGSM)
52 $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
Fabio Bertonefa58492015-10-26 13:22:07 -020053@@ -308,15 +314,15 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080054 # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
55
56 $(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
57- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
58+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
59
60 $(UNTOAST): $(BIN) $(TOAST)
61 -rm $(RMFLAGS) $(UNTOAST)
62- $(LN) $(TOAST) $(UNTOAST)
63+ $(LN) toast $(UNTOAST)
64
65 $(TCAT): $(BIN) $(TOAST)
66 -rm $(RMFLAGS) $(TCAT)
67- $(LN) $(TOAST) $(TCAT)
68+ $(LN) toast $(TCAT)
69
70
71 # The local bin and lib directories
Fabio Bertonefa58492015-10-26 13:22:07 -020072@@ -426,7 +432,9 @@ semi-clean:
Holger Hans Peter Freytherb49f5122011-11-11 21:36:15 +080073
74 clean: semi-clean
75 -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
76- $(TOAST) $(TCAT) $(UNTOAST) \
77+ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.12 \
78+ $(LIB)libgsm.so.1 \
79+ $(TOAST) $(TCAT) $(UNTOAST) \
80 $(ROOT)/gsm-1.0.tar.Z
81
82
Fabio Bertonefa58492015-10-26 13:22:07 -020083--
842.1.4
85