Fabio Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [configuration] |
| 2 | |
| 3 | Subject: [PATCH 1/5] Configure Makefile |
| 4 | Organization: O.S. Systems Software LTDA. |
| 5 | |
| 6 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> |
| 7 | --- |
| 8 | Makefile | 20 ++++++++++++++------ |
| 9 | 1 file changed, 14 insertions(+), 6 deletions(-) |
| 10 | |
| 11 | diff --git a/Makefile b/Makefile |
| 12 | index 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 Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 16 | # Other tools |
| 17 | |
| 18 | SHELL = /bin/sh |
| 19 | -LN = ln |
| 20 | +LN = ln -s |
| 21 | BASENAME = basename |
| 22 | AR = ar |
| 23 | ARFLAGS = cr |
Fabio Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 24 | @@ -140,6 +140,7 @@ LFLAGS = $(LDFLAGS) $(LDINC) |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 25 | # Targets |
| 26 | |
| 27 | LIBGSM = $(LIB)/libgsm.a |
Fabio Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 28 | +LIBGSMSO = $(LIB)/libgsm.so |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 29 | |
| 30 | TOAST = $(BIN)/toast |
| 31 | UNTOAST = $(BIN)/untoast |
Fabio Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 32 | @@ -279,7 +280,7 @@ TOAST_INSTALL_TARGETS = \ |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 33 | |
| 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 Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 41 | @@ -299,6 +300,11 @@ install: toastinstall gsminstall |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 42 | |
| 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 Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 53 | @@ -308,15 +314,15 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS) |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 54 | # 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 Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 72 | @@ -426,7 +432,9 @@ semi-clean: |
Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 73 | |
| 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 Berton | efa5849 | 2015-10-26 13:22:07 -0200 | [diff] [blame] | 83 | -- |
| 84 | 2.1.4 |
| 85 | |