998b9ba7a7
From Brad with tweaks by me
87 lines
2.4 KiB
Plaintext
87 lines
2.4 KiB
Plaintext
$OpenBSD: patch-make_linux_Makefile,v 1.5 2011/10/04 08:59:41 giovanni Exp $
|
|
--- make/linux/Makefile.orig Sun Oct 2 16:04:20 2011
|
|
+++ make/linux/Makefile Sun Oct 2 16:05:23 2011
|
|
@@ -33,8 +33,8 @@ INSTALL_DIR_OPTS = -m 755
|
|
CWD=$(shell pwd)
|
|
|
|
# Options
|
|
-LIBEBML_INCLUDE_DIR=$(CWD)/../../../libebml
|
|
-LIBEBML_LIB_DIR=$(CWD)/../../../libebml/make/linux
|
|
+LIBEBML_INCLUDE_DIR=$(LOCALBASE)/include
|
|
+LIBEBML_LIB_DIR=$(LOCALBASE)/lib
|
|
EXTENSION=.cpp
|
|
|
|
ifeq (yes,$(DEBUG))
|
|
@@ -53,8 +53,7 @@ MUX_LIBS=-lmatroska -lebml $(LIBICONV)
|
|
|
|
# Names
|
|
LIBRARY=libmatroska.a
|
|
-LIBRARY_SO=libmatroska.so
|
|
-LIBRARY_SO_VER=libmatroska.so.5
|
|
+LIBRARY_SO_VER=libmatroska.so.${LIBmatroska_VERSION}
|
|
|
|
# source-files
|
|
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
|
@@ -81,7 +80,7 @@ endif
|
|
|
|
staticlib: $(LIBRARY)
|
|
|
|
-sharedlib: $(LIBRARY_SO)
|
|
+sharedlib: $(LIBRARY_SO_VER)
|
|
|
|
lib:
|
|
@echo "Use the 'staticlib', 'sharedlib' or 'all' targets."
|
|
@@ -98,15 +97,12 @@ $(LIBRARY): $(objects)
|
|
$(AR) rcvu $@ $(objects)
|
|
$(RANLIB) $@
|
|
|
|
-$(LIBRARY_SO): $(objects_so)
|
|
- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
|
|
- rm -f $(LIBRARY_SO)
|
|
- ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
|
|
+$(LIBRARY_SO_VER): $(objects_so)
|
|
+ $(CXX) -shared -fPIC -o $(LIBRARY_SO_VER) $(objects_so) $(LINKFLAGS) -lebml
|
|
|
|
clean: cleantest
|
|
rm -f $(objects) $(objects_so)
|
|
rm -f $(LIBRARY)
|
|
- rm -f $(LIBRARY_SO)
|
|
rm -f $(LIBRARY_SO_VER)
|
|
rm -f CORE
|
|
|
|
@@ -128,19 +124,19 @@ depend:
|
|
|
|
test: test6 test9
|
|
|
|
-test6: test6.o $(LIBRARY) $(LIBRARY_SO)
|
|
+test6: test6.o $(LIBRARY) $(LIBRARY_SO_VER)
|
|
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
|
|
|
test6.o: $(MUX_SRC_DIR)test6.cpp
|
|
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
|
|
|
-test8: test8.o $(LIBRARY) $(LIBRARY_SO)
|
|
+test8: test8.o $(LIBRARY) $(LIBRARY_SO_VER)
|
|
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
|
|
|
test8.o: $(MUX_SRC_DIR)test8.cpp
|
|
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
|
|
|
-test9: test9.o $(LIBRARY) $(LIBRARY_SO)
|
|
+test9: test9.o $(LIBRARY) $(LIBRARY_SO_VER)
|
|
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
|
|
|
test9.o: $(TAG_SRC_DIR)test9.cpp
|
|
@@ -166,10 +162,9 @@ install_staticlib: $(LIBRARY)
|
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
|
|
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
|
|
|
|
-install_sharedlib: $(LIBRARY_SO)
|
|
+install_sharedlib: $(LIBRARY_SO_VER)
|
|
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
|
|
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
|
|
- ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
include .depend
|