From 7c4614069bbbb069fbf94726b4864d1857cc397a Mon Sep 17 00:00:00 2001 From: murray Date: Thu, 11 Jun 2020 09:17:04 +0100 Subject: [PATCH] fix cross compilation --- Makefile | 20 +++++++++----------- tsm/Makefile | 3 +-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f874b0e..24ed258 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,12 @@ +WAYLAND_PROTOCOLS_DIR != pkg-config --variable=pkgdatadir wayland-protocols +WAYLAND_SCANNER := wayland-scanner -SCANNER := wayland-scanner -PROTDATADIR != pkg-config --variable=datarootdir wayland-protocols -PROTDIR := $(PROTDATADIR)/wayland-protocols +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin -PREFIX=/usr/local -BINDIR=$(PREFIX)/bin +CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wno-parentheses - -VPATH=$(PROTDIR)/stable/xdg-shell +VPATH=$(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell LIBS=-lrt -lm -lutil -lwayland-client -lwayland-cursor -lxkbcommon -Ltsm -lhtsm OBJ=xdg-shell.o gtk-primary-selection.o glyph.o main.o GEN=xdg-shell.c xdg-shell.h gtk-primary-selection.c gtk-primary-selection.h @@ -29,12 +27,12 @@ clean: $(OBJ): $(GEN) %.c: %.xml - $(SCANNER) private-code < $< > $@ + $(WAYLAND_SCANNER) private-code < $< > $@ %.h: %.xml - $(SCANNER) client-header < $< > $@ + $(WAYLAND_SCANNER) client-header < $< > $@ tsm: $(MAKE) -C $@ -.PHONY: install clean tsm uninstall +.PHONY: install uninstall clean tsm diff --git a/tsm/Makefile b/tsm/Makefile index 2ec1c44..8383e03 100644 --- a/tsm/Makefile +++ b/tsm/Makefile @@ -1,5 +1,4 @@ - -CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-sign-compare +CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-sign-compare OBJ=wcwidth.o shl-htable.o\ tsm-render.o tsm-screen.o tsm-selection.o\