blob: 7d86cde1ba637fc58d40d493793593260d779f9b (
plain)
1 diff --git c/GNUmakefile i/GNUmakefile
2 index 1693f5a..b33a42e 100644
3 --- c/GNUmakefile
4 +++ i/GNUmakefile
5 @@ -112,10 +112,10 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
6 JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
7 JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
8
9 -CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
10 +CFLAGS=-O2 -fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations
11 CPPFLAGS=-Iinclude
12
13 -all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
14 +all: snowball libstemmer.o libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
15
16 clean:
17 rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
18 @@ -158,6 +158,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
19 libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
20 $(AR) -cru $@ $^
21
22 +libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
23 + $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libstemmer.so.0,-version-script,libstemmer/symbol.map -o $@.0.0.0 $^
24 +
25 stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
26 $(CC) -o $@ $^
27
28 diff --git c/libstemmer/symbol.map i/libstemmer/symbol.map
29 new file mode 100644
30 index 0000000..7a3d423
31 --- /dev/null
32 +++ i/libstemmer/symbol.map
33 @@ -0,0 +1,6 @@
34 +SB_STEMMER_0 {
35 + global:
36 + sb_stemmer_*;
37 + local:
38 + *;
39 +};
|