]> git.pld-linux.org Git - packages/libebml.git/blob - libebml-makefile.patch
- updated to 0.7.5, updated makefile patch
[packages/libebml.git] / libebml-makefile.patch
1 --- libebml-0.7.5/make/linux/Makefile.orig      2005-04-19 08:56:06.000000000 +0200
2 +++ libebml-0.7.5/make/linux/Makefile   2005-06-12 20:47:04.374324344 +0200
3 @@ -28,6 +28,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 @@ -50,9 +51,7 @@
12  LIBS=
13  
14  # Names
15 -LIBRARY=libebml.a
16 -LIBRARY_SO=libebml.so
17 -LIBRARY_SO_VER=libebml.so.0
18 +LIBRARY=libebml.la
19  
20  # source-files
21  sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
22 @@ -60,9 +59,8 @@
23  # header files; replace .cxx extension with .h
24  headers:=$(patsubst %$(EXTENSION),%.h,$(sources))
25  
26 -# object files; replace .cxx extension with .o
27 -objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
28 -objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
29 +# object files; replace .cxx extension with .lo
30 +objects:=$(patsubst %$(EXTENSION),%.lo,$(sources))
31  
32  WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow
33  COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
34 @@ -83,19 +81,11 @@
35         @false
36  
37  # Build rules
38 -%.o: %$(EXTENSION)
39 -       $(CXX) -c $(COMPILEFLAGS) -o $@ $<
40 -
41  %.lo: %$(EXTENSION)
42 -       $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
43 +       $(LIBTOOL) --mode=compile $(CXX) -c $(COMPILEFLAGS) -o $@ $<
44  
45  $(LIBRARY): $(objects)
46 -       $(AR) $@ $(objects)
47 -       $(RANLIB) $@
48 -
49 -$(LIBRARY_SO): $(objects_so)
50 -       $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
51 -       ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
52 +       $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) -rpath $(libdir)
53  
54  clean:
55         rm -f $(objects) $(objects_so)
56 @@ -120,26 +110,22 @@
57  ifeq (Darwin,$(shell uname -s))
58  install: install_staticlib install_headers
59  else
60 -install: install_staticlib install_sharedlib install_headers
61 +install: install_lib install_headers
62  endif
63  
64  install_headers:
65 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
66 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
67         for i in $(INCLUDE_DIR)/*.h; do \
68 -               $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
69 +               $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
70         done
71 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c
72 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
73         for i in $(INCLUDE_DIR)/c/*.h; do \
74 -               $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \
75 +               $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
76         done
77  
78 -install_staticlib: $(LIBRARY)
79 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
80 -       $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
81 -
82 -install_sharedlib: $(LIBRARY_SO)
83 -       $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
84 -       ln -s $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
85 +install_lib: $(LIBRARY)
86 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
87 +       $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
88  
89  
90  ifneq ($(wildcard .depend),)
This page took 0.120231 seconds and 3 git commands to generate.