summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-08-22 16:57:38 -0700
committerMatt Turner <[email protected]>2012-08-24 11:08:19 -0700
commit261719b21c3dab4e2c0b79bbe148f494667da67c (patch)
treeccc227cefd3c5c818c05814d303f63fc042f1cc8
parentba4a36d8cdd6425c1263026e953cc3977d1192c6 (diff)
automake: convert vgapi
-rw-r--r--configure.ac4
-rw-r--r--src/mapi/vgapi/.gitignore1
-rw-r--r--src/mapi/vgapi/Makefile94
-rw-r--r--src/mapi/vgapi/Makefile.am62
-rw-r--r--src/mapi/vgapi/vg.pc.in12
5 files changed, 73 insertions, 100 deletions
diff --git a/configure.ac b/configure.ac
index 5a832415fb5..6ff2aed7133 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1367,6 +1367,8 @@ if test "x$enable_openvg" = xyes; then
CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
HAVE_ST_VEGA=yes
+ VG_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
+ AC_SUBST([VG_PC_LIB_PRIV])
fi
dnl
@@ -2035,6 +2037,8 @@ AC_CONFIG_FILES([configs/current
src/mapi/glapi/tests/Makefile
src/mapi/shared-glapi/Makefile
src/mapi/shared-glapi/tests/Makefile
+ src/mapi/vgapi/Makefile
+ src/mapi/vgapi/vg.pc
src/mesa/Makefile
src/mesa/gl.pc
src/mesa/drivers/Makefile
diff --git a/src/mapi/vgapi/.gitignore b/src/mapi/vgapi/.gitignore
index 5becb993861..feff21d7d7f 100644
--- a/src/mapi/vgapi/.gitignore
+++ b/src/mapi/vgapi/.gitignore
@@ -1 +1,2 @@
vgapi_tmp.h
+Makefile
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
deleted file mode 100644
index 91766f00040..00000000000
--- a/src/mapi/vgapi/Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
-# src/mapi/vgapi/Makefile
-
-TOP := ../../..
-include $(TOP)/configs/current
-
-VG_LIB_MAJOR = 1
-VG_LIB_MINOR = 0
-VG_LIB_PATCH = 0
-
-MAPI := $(TOP)/src/mapi/mapi
-
-include $(MAPI)/sources.mak
-VGAPI_SOURCES := $(MAPI_FILES)
-VGAPI_OBJECTS := $(notdir $(MAPI_FILES:.c=.o))
-
-VGAPI_CPPFLAGS := -DMAPI_ABI_HEADER=\"vgapi/vgapi_tmp.h\"
-
-GENERATED_SOURCES := vgapi_tmp.h
-
-INCLUDE_DIRS := \
- -I$(TOP)/include \
- -I$(TOP)/src/mapi
-
-.PHONY: default
-default: depend $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
-
-$(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VGAPI_OBJECTS)
- $(MKLIB) -o $(VG_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(VG_LIB_MAJOR) \
- -minor $(VG_LIB_MINOR) \
- -patch $(VG_LIB_PATCH) \
- -id $(INSTALL_LIB_DIR)/lib$(VG_LIB).$(VG_LIB_MAJOR).dylib \
- $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
- $(VGAPI_OBJECTS) $(VG_LIB_DEPS)
-
-# not used, but kept for completeness
-libvgapi.a: $(VGAPI_OBJECTS)
- @$(MKLIB) -o vgapi -static $(VGAPI_OBJECTS)
-
-$(VGAPI_SOURCES): | $(GENERATED_SOURCES)
-
-$(VGAPI_OBJECTS): %.o: $(MAPI)/%.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(VGAPI_CPPFLAGS) $< -o $@
-
-vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py
- $(PYTHON2) $(PYTHON_FLAGS) $(MAPI)/mapi_abi.py \
- --printer vgapi --mode lib $< > $@
-
-.PHONY: clean
-clean:
- -rm -f vg.pc
- -rm -f $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
- -rm -f libvgapi.a
- -rm -f $(VGAPI_OBJECTS)
- -rm -f depend depend.bak
- -rm -f $(GENERATED_SOURCES)
-
-pcedit = \
- -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
- -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
- -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
- -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
- -e 's,@VG_PC_REQ_PRIV@,$(VG_PC_REQ_PRIV),' \
- -e 's,@VG_PC_LIB_PRIV@,$(VG_PC_LIB_PRIV),' \
- -e 's,@VG_PC_CFLAGS@,$(VG_PC_CFLAGS),' \
- -e 's,@VG_LIB@,$(VG_LIB),'
-
-vg.pc: vg.pc.in
- @sed $(pcedit) $< > $@
-
-install-pc: vg.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $< $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
-install-headers:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/VG
- $(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_INC_DIR)/VG
-
-install: default install-headers install-pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(MINSTALL) $(TOP)/$(LIB_DIR)/$(VG_LIB_GLOB) \
- $(DESTDIR)$(INSTALL_LIB_DIR)
-
-# due to a bug in makedepend, cannot pass VGAPI_CPPFLAGS to it
-$(VGAPI_OBJECTS): vgapi_tmp.h
-
-depend: $(VGAPI_SOURCES)
- @echo "running $(MKDEP)"
- @touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- $(VGAPI_SOURCES) 2>/dev/null | \
- sed -e 's,^$(MAPI)/,,' > depend
-
--include depend
diff --git a/src/mapi/vgapi/Makefile.am b/src/mapi/vgapi/Makefile.am
new file mode 100644
index 00000000000..47875ed8bb5
--- /dev/null
+++ b/src/mapi/vgapi/Makefile.am
@@ -0,0 +1,62 @@
+# Copyright © 2012 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+TOP=$(top_srcdir)
+
+AM_CPPFLAGS = \
+ $(DEFINES) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/mapi \
+ -DMAPI_ABI_HEADER=\"vgapi_tmp.h\"
+
+AM_CFLAGS = $(VISIBILITY_CFLAGS)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = vg.pc
+
+VG_includedir = $(includedir)/VG
+VG_include_HEADERS = \
+ $(top_srcdir)/include/VG/openvg.h \
+ $(top_srcdir)/include/VG/vgext.h \
+ $(top_srcdir)/include/VG/vgplatform.h \
+ $(top_srcdir)/include/VG/vgu.h
+
+lib_LTLIBRARIES = libOpenVG.la
+
+include ../mapi/sources.mak
+libOpenVG_la_SOURCES = $(MAPI_FILES) vgapi_tmp.h
+libOpenVG_la_LIBADD = $(VG_LIB_DEPS)
+libOpenVG_la_LDFLAGS = -version-number 1 -no-undefined
+
+vgapi_tmp.h: $(srcdir)/vgapi.csv $(top_srcdir)/src/mapi/mapi/mapi_abi.py
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(top_srcdir)/src/mapi/mapi/mapi_abi.py \
+ --printer vgapi --mode lib $< > $@
+
+BUILT_SOURCES = vgapi_tmp.h
+CLEANFILES = $(BUILT_SOURCES)
+
+# Provide compatibility with scripts for the old Mesa build system for
+# a while by putting a link to the driver into /lib of the build tree.
+all-local: libOpenVG.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+ ln -f .libs/libOpenVG.so $(top_builddir)/$(LIB_DIR)/libOpenVG.so
+ ln -f .libs/libOpenVG.so.1 $(top_builddir)/$(LIB_DIR)/libOpenVG.so.1
+ ln -f .libs/libOpenVG.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libOpenVG.so.1.0.0
diff --git a/src/mapi/vgapi/vg.pc.in b/src/mapi/vgapi/vg.pc.in
index 63e9af8355b..27a3f634758 100644
--- a/src/mapi/vgapi/vg.pc.in
+++ b/src/mapi/vgapi/vg.pc.in
@@ -1,12 +1,12 @@
-prefix=@INSTALL_DIR@
+prefix=@prefix@
exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
+libdir=@libdir@
+includedir=@includedir@
Name: vg
Description: Mesa OpenVG 1.0 library
-Requires.private: @VG_PC_REQ_PRIV@
+Requires.private:
Version: @VERSION@
-Libs: -L${libdir} -l@VG_LIB@
+Libs: -L${libdir} -lOpenVG
Libs.private: @VG_PC_LIB_PRIV@
-Cflags: -I${includedir} @VG_PC_CFLAGS@
+Cflags: -I${includedir}