diff options
author | Lukas Rusak <lorusak@gmail.com> | 2018-04-25 11:12:39 -0700 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2018-04-25 11:12:39 -0700 |
commit | 4eb7d9681af6fe4d30ddbcb857fb7f51e6f2ac34 (patch) | |
tree | e4aae2956830bd777eb30ce56ddf3ba65804bcac /tools | |
parent | 0887bf5e8450d52a715426e8dd932f5a2016ed5a (diff) |
tools/depends: add libinput
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/libinput/Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
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) |