]> git.pld-linux.org Git - packages/libebml.git/blob - libebml-makefile.patch
- rel 2; build/link using cxx
[packages/libebml.git] / libebml-makefile.patch
1 --- libebml-1.0.0/make/linux/Makefile~  2010-08-05 23:04:21.000000000 +0300
2 +++ libebml-1.0.0/make/linux/Makefile   2010-08-05 23:04:54.438670198 +0300
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.3
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 @@ -78,20 +78,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 --tag=CXX $(CXX) -c $(COMPILEFLAGS) -o $@ $<
44  
45  $(LIBRARY): $(objects)
46 -       $(AR) rcvu $@ $(objects)
47 -       $(RANLIB) $@
48 -
49 -$(LIBRARY_SO): $(objects_so)
50 -       $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
51 -       rm -f $(LIBRARY_SO)
52 -       ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
53 +       $(LIBTOOL) --mode=link --tag=CXX $(LD) $(LDFLAGS) -version-info 3:0:0 -o $@ $^ $(LIBS) -rpath $(libdir)
54  
55  clean:
56         rm -f $(objects) $(objects_so)
57 @@ -121,27 +110,22 @@
58  ifeq (Darwin,$(shell uname -s))
59  install: install_staticlib install_headers
60  else
61 -install: install_staticlib install_sharedlib install_headers
62 +install: install_lib install_headers
63  endif
64  
65  install_headers:
66 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
67 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
68         for i in $(INCLUDE_DIR)/*.h; do \
69 -               $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
70 +               $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
71         done
72 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c
73 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
74         for i in $(INCLUDE_DIR)/c/*.h; do \
75 -               $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \
76 +               $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
77         done
78  
79 -install_staticlib: $(LIBRARY)
80 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
81 -       $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
82 -
83 -install_sharedlib: $(LIBRARY_SO)
84 -       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
85 -       $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
86 -       ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
87 +install_lib: $(LIBRARY)
88 +       $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
89 +       $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
90  
91  
92  ifneq ($(wildcard .depend),)
93
This page took 0.03994 seconds and 3 git commands to generate.