diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2024-08-03 20:51:42 +0700 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2024-08-03 21:06:47 +0700 |
commit | 8254d13bcd89939da8e25b0bcc1910f4c24647b2 (patch) | |
tree | b69f772d81def98def20e5ab7cdbca88b6fa6649 /GNUmakefile | |
parent | af5dfdf7bb0d55a8ba316e4307fb1e6a6d86cd03 (diff) | |
download | beeps-8254d13bcd89939da8e25b0bcc1910f4c24647b2.tar.gz beeps-8254d13bcd89939da8e25b0bcc1910f4c24647b2.tar.xz beeps-8254d13bcd89939da8e25b0bcc1910f4c24647b2.zip |
Beeps
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..96d2e7a --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,42 @@ +pcms := 5m.pcm 10m.pcm 15m.pcm +oggs := $(pcms:.pcm=.ogg) +mp3s := $(pcms:.pcm=.mp3) + +artist := "Tomasz Kramkowski" +genre := Electronic +album := Beeps +year := 2024 +tracknum_5m := 3 +title_5m := "Large Beeps" +tracknum_10m := 2 +title_10m := "Versatile Beeps" +tracknum_15m := 1 +title_15m := "Medium Beeps" + +title = $(title_$(1)) +tracknum = $(tracknum_$(1)) + +all: $(oggs) +mp3: $(mp3s) + +5m.pcm: duration := 300 +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=$@ $< + +%.mp3: %.pcm + lame --quiet -r -s 8 --bitwidth 8 --unsigned -m m -q 5 --tt $(call title,$*) --ta $(artist) --tl $(album) --ty $(year) --tn $(call tracknum,$*) --tg $(genre) --noreplaygain $< $@ + +$(pcms): target/release/beeps GNUmakefile + $< $(duration) >$@ + +target/release/beeps: Cargo.lock Cargo.toml beeps.rs + cargo build --release + +clean: + rm $(oggs) $(mp3s) $(pcms) + cargo clean + +.PHONY: all mp3 clean |