aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2024-08-04 10:58:20 +0700
committerTomasz Kramkowski <tomasz@kramkow.ski>2024-08-04 10:58:20 +0700
commitcf3b54a5523d8d2f8724ec54b78ecd71d0b268a9 (patch)
treeb71f8aaf1909c8d4cd451c43e466e1e3eaa89b4c
parent0ee8c17bd25e8e79776af2c13d43dd1655597994 (diff)
downloadbeeps-cf3b54a5523d8d2f8724ec54b78ecd71d0b268a9.tar.gz
beeps-cf3b54a5523d8d2f8724ec54b78ecd71d0b268a9.tar.xz
beeps-cf3b54a5523d8d2f8724ec54b78ecd71d0b268a9.zip
Makefile improvementsHEADmaster
-rw-r--r--GNUmakefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 82769b1..93f1727 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -13,8 +13,7 @@ title_10m := "Versatile Beeps"
tracknum_15m := 1
title_15m := "Medium Beeps"
-title = $(title_$(1))
-tracknum = $(tracknum_$(1))
+get = $($(1)_$(2))
all: ogg mp3
ogg: $(oggs)
@@ -24,16 +23,21 @@ mp3: $(mp3s)
10m.pcm: duration := 600
15m.pcm: duration := 900
-%.ogg: %.pcm
- oggenc --quiet --raw --raw-bits=8 --raw-chan=1 --raw-rate=8000 --quality=5 --artist=$(artist) --genre=$(genre) --date=$(year) --tracknum=$(call tracknum,$*) --title=$(call title,$*) --album=$(album) --output=$@ $<
+%.ogg: %.pcm GNUmakefile
+ oggenc --quiet --raw --raw-bits=8 --raw-chan=1 --raw-rate=8000 --quality=5 \
+ --artist=$(artist) --genre=$(genre) --date=$(year) \
+ --tracknum=$(call get,tracknum,$*) --title=$(call get,title,$*) \
+ --album=$(album) --output=$@ $<
-%.mp3: %.pcm
- lame --quiet -r -s 8 --bitwidth 8 --unsigned -m m -V 4 --tt $(call title,$*) --ta $(artist) --tl $(album) --ty $(year) --tn $(call tracknum,$*) --tg $(genre) --noreplaygain $< $@
+%.mp3: %.pcm GNUmakefile
+ lame --quiet -r -s 8 --bitwidth 8 --unsigned -m m -V 4 \
+ --tt $(call get,title,$*) --ta $(artist) --tl $(album) --ty $(year) \
+ --tn $(call get,tracknum,$*) --tg $(genre) --noreplaygain $< $@
$(pcms): target/release/beeps GNUmakefile
$< $(duration) >$@
-target/release/beeps: Cargo.lock Cargo.toml beeps.rs
+target/release/beeps: Cargo.lock Cargo.toml beeps.rs GNUmakefile
cargo build --release
clean: