From 4eb7d9681af6fe4d30ddbcb857fb7f51e6f2ac34 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Wed, 25 Apr 2018 11:12:39 -0700 Subject: tools/depends: add libinput --- tools/depends/target/libinput/Makefile | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tools/depends/target/libinput/Makefile (limited to 'tools') diff --git a/tools/depends/target/libinput/Makefile b/tools/depends/target/libinput/Makefile new file mode 100644 index 0000000000..ccf98657ff --- /dev/null +++ b/tools/depends/target/libinput/Makefile @@ -0,0 +1,55 @@ +include ../../Makefile.include +DEPS=../../Makefile.include Makefile + +# lib name, version +LIBNAME=libinput +VERSION=1.10.5 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.xz + +# configuration settings +CONFIGURE= $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \ + --prefix=$(PREFIX) \ + --libdir=lib \ + -Ddebug-gui=false \ + -Ddocumentation=false \ + -Dlibwacom=false \ + -Dtests=false + +ifeq ($(CROSS_COMPILING), yes) +CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson +export CC=$(CC_FOR_BUILD) +export CXX=$(CXX_FOR_BUILD) +export CFLAGS=$(CFLAGS_FOR_BUILD) +export CXXFLAGS=$(CXXFLAGS_FOR_BUILD) +else +export CC CXX CFLAGS CXXFLAGS +endif +export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig + +LIBDYLIB=$(PLATFORM)/build/libinput.a + +all: .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); rm -rf build; mkdir -p build + cd $(PLATFORM); $(CONFIGURE) . build + +$(LIBDYLIB): $(PLATFORM) + cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v + +.installed-$(PLATFORM): $(LIBDYLIB) + cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v install + touch $@ + +clean: + $(MAKE) -C $(PLATFORM) clean + rm -f .installed-$(PLATFORM) + +distclean: + rm -rf $(PLATFORM) .installed-$(PLATFORM) -- cgit v1.2.3