From df610e1045838c6f979fc202654e25c6e01b42f0 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Fri, 1 Mar 2024 03:47:03 +0200 Subject: [PATCH] improved makefiles --- Makefile | 6 ++++-- src/Makefile | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9d12b8a..f66914f 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,9 @@ endif apps: $(MAKE) -C src - $(ECHO) ln -sf src/*.bin . + for i in src/ustreamer.bin src/ustreamer-*.bin; do \ + test ! -x $$i || ln -sf $$i .; \ + done python: @@ -117,7 +119,7 @@ clean-all: linters clean clean: rm -rf pkg/arch/pkg pkg/arch/src pkg/arch/v*.tar.gz pkg/arch/ustreamer-*.pkg.tar.{xz,zst} - rm -f *.bin *.so + rm -f ustreamer ustreamer-* *.so $(MAKE) -C src clean $(MAKE) -C python clean $(MAKE) -C janus clean diff --git a/src/Makefile b/src/Makefile index 539bf7d..b007f75 100644 --- a/src/Makefile +++ b/src/Makefile @@ -88,13 +88,16 @@ override _CFLAGS += $(shell pkg-config --cflags libdrm) _V4P_LDFLAGS = $(shell pkg-config --libs libdrm) endif + # ===== all: $(_TARGETS) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin - for i in $(subst .bin,,$(_TARGETS)); do install -m755 $$i.bin $(DESTDIR)$(PREFIX)/bin/$$i; done + for i in $(subst .bin,,$(_TARGETS)); do \ + install -m755 $$i.bin $(DESTDIR)$(PREFIX)/bin/$$i; \ + done install-strip: install