improved makefiles

This commit is contained in:
Maxim Devaev
2024-03-01 03:47:03 +02:00
parent 8d4e6a13b0
commit df610e1045
2 changed files with 8 additions and 3 deletions

View File

@@ -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

View File

@@ -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