From 3899884d6c15251255b8217ae19f78a8f5d0a08c Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Mon, 30 Oct 2017 14:32:03 +0100
Subject: [PATCH 1/3] build: use a Makefile
Only needed for VLC 3.0
Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++
src/config.h | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+)
create mode 100644 Makefile
create mode 100644 src/config.h
new file mode 100644
@@ -0,0 +1,38 @@
+SRCS := colorspace.c common.c context.c dither.c dispatch.c filters.c ra.c renderer.c shaders.c \
+ shaders/colorspace.c shaders/sampling.c spirv.c bstr/bstr.c bstr/format.c 3rdparty/siphash.c \
+ ta/ta.c ta/ta_utils.c ta/talloc.c
+
+lpthread_libs = $(shell $(LD) -lpthread && echo "-lpthread" || echo "")
+
+OBJS = $(patsubst %.c, $(OBJDIR)src/%.o, $(SRCS))
+
+CFLAGS += -D_ISOC99_SOURCE -D_GNU_SOURCE \
+ -Isrc -Isrc/osdep -Isrc/include \
+ -fvisibility=hidden -Wall -Wundef -Wmissing-prototypes -Wshadow \
+ -Wparentheses -Wpointer-arith -Wno-pointer-sign
+
+targets = libplacebo.a
+
+all: $(targets)
+
+install: $(targets)
+ rm -rf $(PREFIX)/include/libplacebo
+ mkdir -p $(PREFIX)/lib/pkgconfig/ $(PREFIX)/include/libplacebo
+ cp -r src/include/libplacebo $(PREFIX)/include
+ cp src/config.h $(PREFIX)/include/libplacebo
+ cp libplacebo.a $(PREFIX)/lib/
+ @echo "Name: libplacebo" > $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Description: Reusable library for GPU-accelerated video/image rendering" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Version: 0.2.1" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Libs: -L$(PREFIX)/lib -lplacebo $(lpthread_libs)" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+ @echo "Cflags: -I$(PREFIX)/include" >> $(PREFIX)/lib/pkgconfig/libplacebo.pc
+
+$(OBJDIR)/%.o: src/%.c
+ $(CC) -c $(CFLAGS) $< -o $@
+
+libplacebo.a: $(OBJS)
+ $(AR) csr $@ $^
+
+clean:
+ rm -f *.o
+ rm -f $(targets)
new file mode 100644
@@ -0,0 +1,41 @@
+/*
+ * This file is part of libplacebo.
+ *
+ * libplacebo is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * libplacebo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with libplacebo. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBPLACEBO_CONFIG_H_
+#define LIBPLACEBO_CONFIG_H_
+
+// Increased any time the library changes in a fundamental/major way.
+#define PL_MAJOR_VER 0
+
+// Increased any time the API changes. (Note: Does not reset when PL_MAJOR_VER
+// is increased)
+#define PL_API_VER 2
+
+// Increased any time a fix is made to a given API version.
+#define PL_FIX_VER 1
+
+// Friendly name (`git describe`) for the overall version of the library
+#define PL_VERSION "v0.2.1"
+
+// Feature tests. These aren't described in further detail, but may be useful
+// for programmers wanting to programmatically check for feature support
+// in their compiled libshaderc versions.
+#define PL_HAVE_SHADERC 0
+#define PL_HAVE_VULKAN 0
+
+
+#endif // LIBPLACEBO_CONTEXT_H_
--
2.11.0