blob: 881d0792bb443f502e55760f9eb4eec5efe66cb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
diff -Naur libebml-0.7.1.orig/make/linux/Makefile libebml-0.7.1/make/linux/Makefile
--- libebml-0.7.1.orig/make/linux/Makefile 2004-07-19 09:39:13.000000000 -0700
+++ libebml-0.7.1/make/linux/Makefile 2004-10-08 03:26:40.522886558 -0700
@@ -49,6 +49,8 @@
# Names
LIBRARY=libebml.a
+LIBRARY_SO=libebml.so
+LIBRARY_SO_VER=libebml.so.0
# source-files
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
@@ -61,36 +63,48 @@
# object files; replace .cxx extension with .o
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
+objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow
COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
DEPENDFLAGS = ${CXXFLAGS} ${INCLUDE}
-all: $(LIBRARY)
+all: $(LIBRARY) $(LIBRARY_SO)
-lib library: $(LIBRARY)
+lib library: $(LIBRARY) $(LIBRARY_SO)
# Build rules
%.o: %$(EXTENSION)
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
+%.lo: %$(EXTENSION)
+ $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+
$(LIBRARY): $(objects)
$(AR) $@ $(objects)
$(RANLIB) $@
+$(LIBRARY_SO): $(objects_so)
+ $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
+ ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+
clean:
rm -f $(objects)
rm -f $(dependencies)
rm -f $(LIBRARY)
+ rm -f $(LIBRARY_SO)
+ rm -f $(LIBRARY_SO_VER)
rm -f CORE
# what are the source dependencies
depend: $(sources)
$(DEPEND) $(DEPENDFLAGS) $(sources)
-install: $(LIBRARY)
+install: $(LIBRARY) $(LIBRARY_SO)
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
+ ln -s $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
for i in $(INCLUDE_DIR)/*.h; do \
$(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
|