]> git.pld-linux.org Git - packages/libebml.git/blame - libebml-makefile.patch
- better makefile patch (use libtool, it takes care of using fPIC etc.)
[packages/libebml.git] / libebml-makefile.patch
CommitLineData
1e89c424
JB
1--- libebml-0.4.4/make/linux/Makefile.orig 2003-06-13 20:54:48.000000000 +0200
2+++ libebml-0.4.4/make/linux/Makefile 2003-07-08 22:00:10.000000000 +0200
3@@ -25,6 +25,7 @@
4 INSTALL_OPTS = -m 644
5 INSTALL_OPTS_LIB = -m 644
6 INSTALL_DIR_OPTS = -m 755
7+LIBTOOL = libtool
8
9 # Options
10 EXTENSION=.cpp
11@@ -43,7 +44,7 @@
a4e2ab5f 12 LIBS=
13
14 # Names
15-LIBRARY=libebml.a
1e89c424 16+LIBRARY=libebml.la
a4e2ab5f 17
18 # source-files
19 sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
1e89c424
JB
20@@ -54,8 +55,8 @@
21 # files holding dependency information; replace .cxx extension with .dep
22 dependencies:=$(patsubst %$(EXTENSION),%.dep,$(sources))
23
24-# object files; replace .cxx extension with .o
25-objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
26+# object files; replace .cxx extension with .lo
27+objects:=$(patsubst %$(EXTENSION),%.lo,$(sources))
28
29 DEPENDFLAGS = ${CXXFLAGS} ${INCLUDE}
30
31@@ -64,14 +65,12 @@
32 lib library: $(LIBRARY)
33
34 # Build rules
35-%.o: %$(EXTENSION)
36- $(CXX) -c $(CXXFLAGS) $(INCLUDE) -o $@ $<
37+%.lo: %$(EXTENSION)
38+ $(LIBTOOL) --mode=compile $(CXX) -c $(CXXFLAGS) $(INCLUDE) -o $@ $<
a4e2ab5f 39
40 $(LIBRARY): $(objects)
41- $(AR) $@ $(objects)
42- $(RANLIB) $@
43-# $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
44-# ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
1e89c424 45+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) -rpath $(libdir)
a4e2ab5f 46+
47
48 clean:
49 rm -f $(objects)
1e89c424
JB
50@@ -84,15 +83,15 @@
51 $(DEPEND) $(DEPENDFLAGS) $(sources)
a4e2ab5f 52
53 install: $(LIBRARY)
1e89c424 54- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
a4e2ab5f 55- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
1e89c424
JB
56- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
57+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
58+ $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
59+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
a4e2ab5f 60 for i in $(SRC_DIR)/*.h; do \
1e89c424
JB
61- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
62+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
63 done
64- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/api/c
65+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/api/c
66 for i in $(SRC_DIR)/api/c/*.h; do \
67- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/api/c ; \
68+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/api/c ; \
69 done
70
71 # DO NOT DELETE
This page took 0.102528 seconds and 4 git commands to generate.