mirror of
https://github.com/D-Modem/speaking-clock.git
synced 2026-11-28 12:38:05 -08:00
make builds app_speakingclock and mod_speakingclock for whichever PBX headers are installed (or PBX=...), synth/mssam and synth/macintalk, sclock-render, and fetches the Microsoft and Apple voice data from the Internet Archive into sources/. make install runs each part's install. macintalk now takes VOICEDIR from PREFIX like mssam does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSErpfiUMyvxPjp5Am
37 lines
1.3 KiB
Makefile
37 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# make build macintalk
|
|
# make voices fetch Apple's voice data (MacInTalk 3 and PlainTalk, about 180 MB download)
|
|
# make install install the program and the voices
|
|
# make test speak a sentence with every voice
|
|
PREFIX ?= /usr/local
|
|
VOICEDIR ?= $(PREFIX)/share/macintalk
|
|
CC ?= cc
|
|
CFLAGS ?= -O2 -Wall -Wextra -Wno-missing-field-initializers
|
|
SOURCES ?= ../../sources/macintalk
|
|
|
|
macintalk: macintalk.c plaintalk.c rules.h
|
|
$(CC) $(CFLAGS) -DVOICEDIR='"$(VOICEDIR)"' -o $@ macintalk.c -lm
|
|
|
|
voices: $(SOURCES)/fred.ttvd
|
|
|
|
$(SOURCES)/fred.ttvd:
|
|
python3 ../../tools/fetch-macintalk.py $(SOURCES)
|
|
|
|
install: macintalk voices
|
|
install -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(VOICEDIR)
|
|
install -m 755 macintalk $(DESTDIR)$(PREFIX)/bin/macintalk
|
|
install -m 644 $(SOURCES)/*.ttvd $(SOURCES)/*.ttvw $(DESTDIR)$(VOICEDIR)/
|
|
for f in $(SOURCES)/*.gtss; do [ ! -f "$$f" ] || install -m 644 "$$f" $(DESTDIR)$(VOICEDIR)/; done
|
|
|
|
test: macintalk voices
|
|
@for v in $$(./macintalk -d $(SOURCES) -l | cut -d' ' -f1); do \
|
|
./macintalk -d $(SOURCES) -v $$v -o /tmp/macintalk-$$v.wav \
|
|
"At the third stroke, it will be ten oh five and twenty seconds." && \
|
|
echo "/tmp/macintalk-$$v.wav"; \
|
|
done
|
|
|
|
clean:
|
|
rm -f macintalk
|
|
|
|
.PHONY: voices install test clean
|