7810
|
1 |
--- gsm-1.0-pl13/Makefile Sun Oct 23 11:19:08 2011
|
|
2 |
+++ gsm-1.0-pl13/Makefile Sun Oct 23 11:16:48 2011
|
368
|
3 |
@@ -30,6 +30,8 @@
|
|
4 |
######### define this, and read about the GSM_OPT_WAV49 option in the
|
|
5 |
######### manual page on gsm_option(3).
|
|
6 |
|
|
7 |
+MAJOR=1
|
|
8 |
+
|
|
9 |
# Choose a compiler. The code works both with ANSI and K&R-C.
|
|
10 |
# Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
|
|
11 |
# compile without, function prototypes in the header files.
|
|
12 |
@@ -43,8 +45,8 @@
|
|
13 |
# CC = /usr/lang/acc
|
|
14 |
# CCFLAGS = -c -O
|
|
15 |
|
|
16 |
-CC = gcc -ansi -pedantic
|
|
17 |
-CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
|
|
18 |
+# CC = gcc -ansi -pedantic
|
|
19 |
+# CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
|
|
20 |
|
|
21 |
LD = $(CC)
|
|
22 |
|
7810
|
23 |
@@ -71,7 +73,7 @@
|
368
|
24 |
# Leave INSTALL_ROOT empty (or just don't execute "make install") to
|
|
25 |
# not install gsm and toast outside of this directory.
|
|
26 |
|
|
27 |
-INSTALL_ROOT =
|
|
28 |
+# INSTALL_ROOT =
|
|
29 |
|
|
30 |
# Where do you want to install the gsm library, header file, and manpages?
|
|
31 |
#
|
7810
|
32 |
@@ -78,10 +80,10 @@
|
368
|
33 |
# Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
|
|
34 |
# this directory.
|
|
35 |
|
|
36 |
-GSM_INSTALL_ROOT = $(INSTALL_ROOT)
|
|
37 |
+GSM_INSTALL_ROOT = $(DESTDIR)$(INSTALL_ROOT)
|
|
38 |
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
|
|
39 |
-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
|
|
40 |
-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
|
|
41 |
+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include
|
|
42 |
+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
|
|
43 |
|
|
44 |
|
|
45 |
# Where do you want to install the toast binaries and their manpage?
|
|
46 |
@@ -89,18 +91,18 @@
|
|
47 |
# Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
|
|
48 |
# of this directory.
|
|
49 |
|
|
50 |
-TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
|
|
51 |
+TOAST_INSTALL_ROOT = $(DESTDIR)$(INSTALL_ROOT)
|
|
52 |
TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
|
|
53 |
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
|
|
54 |
+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
|
|
55 |
|
|
56 |
# Other tools
|
|
57 |
|
|
58 |
-SHELL = /bin/sh
|
|
59 |
+SHELL = /bin/bash
|
|
60 |
LN = ln
|
|
61 |
BASENAME = basename
|
|
62 |
AR = ar
|
|
63 |
ARFLAGS = cr
|
|
64 |
-RMFLAGS =
|
|
65 |
+RMFLAGS = -f
|
|
66 |
FIND = find
|
|
67 |
COMPRESS = compress
|
|
68 |
COMPRESSFLAGS =
|
|
69 |
@@ -129,7 +131,7 @@
|
|
70 |
# DEBUG = -DNDEBUG
|
|
71 |
######### Remove -DNDEBUG to enable assertions.
|
|
72 |
|
|
73 |
-CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
|
|
74 |
+CFLAGS = -c $(PICFLAG) $(OPTFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
|
|
75 |
$(WAV49) $(CCINC) -I$(INC)
|
|
76 |
######### It's $(CC) $(CFLAGS)
|
|
77 |
|
|
78 |
@@ -139,7 +141,7 @@
|
|
79 |
|
|
80 |
# Targets
|
|
81 |
|
|
82 |
-LIBGSM = $(LIB)/libgsm.a
|
|
83 |
+LIBGSM = $(LIB)/libgsm.so.$(MAJOR)
|
|
84 |
|
|
85 |
TOAST = $(BIN)/toast
|
|
86 |
UNTOAST = $(BIN)/untoast
|
|
87 |
@@ -257,7 +259,7 @@
|
|
88 |
# Install targets
|
|
89 |
|
|
90 |
GSM_INSTALL_TARGETS = \
|
|
91 |
- $(GSM_INSTALL_LIB)/libgsm.a \
|
|
92 |
+ $(GSM_INSTALL_LIB)/libgsm.so.$(MAJOR) \
|
|
93 |
$(GSM_INSTALL_INC)/gsm.h \
|
|
94 |
$(GSM_INSTALL_MAN)/gsm.3 \
|
|
95 |
$(GSM_INSTALL_MAN)/gsm_explode.3 \
|
7810
|
96 |
@@ -301,14 +303,13 @@
|
368
|
97 |
|
|
98 |
$(LIBGSM): $(LIB) $(GSM_OBJECTS)
|
|
99 |
-rm $(RMFLAGS) $(LIBGSM)
|
|
100 |
- $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
|
|
101 |
- $(RANLIB) $(LIBGSM)
|
|
102 |
+ $(LD) -G $(GSM_OBJECTS) -o $(LIBGSM) $(LDFLAGS)
|
|
103 |
|
|
104 |
|
|
105 |
# Toast, Untoast and Tcat -- the compress-like frontends to gsm.
|
7810
|
106 |
|
|
107 |
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
|
|
108 |
- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
|
|
109 |
+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) -lgsm -L./lib $(LDLIB)
|
|
110 |
|
|
111 |
$(UNTOAST): $(BIN) $(TOAST)
|
|
112 |
-rm $(RMFLAGS) $(UNTOAST)
|
368
|
113 |
@@ -393,9 +394,10 @@
|
|
114 |
cp $? $@
|
|
115 |
chmod 444 $@
|
|
116 |
|
|
117 |
-$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
|
|
118 |
+$(GSM_INSTALL_LIB)/libgsm.so.$(MAJOR): $(LIBGSM)
|
|
119 |
-rm $@
|
|
120 |
cp $? $@
|
|
121 |
+ ( cd $(GSM_INSTALL_LIB) ; ln -s libgsm.so.$(MAJOR) libgsm.so )
|
|
122 |
chmod 444 $@
|
|
123 |
|
|
124 |
|