er2cord/Makefile

36 lines
632 B
Makefile
Raw Permalink Normal View History

# You can still use meson, but can make
2021-11-07 18:34:50 +00:00
NAME = er2cord
2021-11-10 09:19:29 +00:00
IPAT ?= /usr
TMP = ./.$(NAME)
#$(abspath ./.$(NAME))
2021-11-07 18:34:50 +00:00
all: build
build: build/$(NAME)
2021-11-07 18:34:50 +00:00
build/$(NAME):
2021-11-10 09:19:29 +00:00
meson build --prefix="$(IPAT)"
ninja -C build
2021-11-07 18:34:50 +00:00
2021-11-10 09:19:29 +00:00
deb: clean
make DESTDIR="$(TMP)" install
cp -r tools/DEBIAN $(TMP)
chmod 755 $(TMP)/DEBIAN/postinst
@dpkg-deb -b $(TMP) er2cord.deb
rm -rf $(TMP)
install: build
2021-11-10 09:19:29 +00:00
DESTDIR="../$(DESTDIR)" ninja -C build install
find "$(DESTDIR)" -exec chmod 755 {} \;
uninstall: build
ninja -C build uninstall
2021-11-07 18:34:50 +00:00
docs: build
2021-11-10 09:19:29 +00:00
mkdir -p "$(IPAT)"
find dist/ ! -name '*er2cord*' -exec cp -f "{}" "$(IPAT)" \;
2021-11-07 18:34:50 +00:00
clean:
2021-11-10 09:19:29 +00:00
rm -rf build $(TMP)