Files
bbs/Makefile
T
Claude 7399e0fa36 Point repository references at the D-Modem organisation
The repositories moved from Neo-Desktop to the D-Modem GitHub
organisation: D-Modem-RE is now D-Modem/D-Modem, pico-serial is
D-Modem/hardware, modemmenu (PBX-Modem) is D-Modem/menu, bbs-sec is
D-Modem/bbs and go3270-sec is D-Modem/go3270.  Update links, module
paths, submodule URLs and source-location strings to match.  Copyright
notices still name Neo-Desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
2026-10-29 09:02:40 +00:00

51 lines
1.6 KiB
Makefile

PREFIX ?= /usr/local
GO ?= go
# go3270 is replaced by the D-Modem/go3270 fork (go.mod): fetch it
# from GitHub directly, not through the public proxy and checksum database
export GOPRIVATE ?= github.com/D-Modem/*
all: bbs
bbs:
$(GO) build -o bbs ./cmd/bbs
test:
$(GO) vet ./...
$(GO) test -race ./...
install: bbs
install -D -m 0755 bbs $(DESTDIR)$(PREFIX)/bin/bbs
@if [ ! -e $(DESTDIR)/etc/bbs/bbs.conf ]; then \
install -D -m 0640 bbs.conf.sample $(DESTDIR)/etc/bbs/bbs.conf; \
fi
# the dosemu2 image DOS doors run in (Docker; it builds dosemu2 from source)
doors-image:
docker build -t bbs-dosemu2 doors/dosemu2
# regenerates internal/api/pb from proto/bbs.proto (needs protoc and
# protoc-gen-go; the generated code is committed)
proto:
protoc --go_out=. --go_opt=module=github.com/D-Modem/bbs proto/bbs.proto
# regenerates internal/phone's tables from a checkout of Google's
# libphonenumber (git clone --depth 1 https://github.com/google/libphonenumber)
# and NANPA's area code report (curl -O https://reports.nanpa.com/public/npa_report.csv)
LIBPHONENUMBER ?= ../libphonenumber
NANPA ?= npa_report.csv
phone-data:
$(GO) run ./internal/phone/gen -src $(LIBPHONENUMBER) -nanpa $(NANPA)
# fetches Ruffle's self-hosted package (Flash for the image boards: [chan]
# ruffle = ./ruffle) from npm, unpacked into ruffle/
RUFFLE_VERSION ?= 0.7.1
ruffle:
rm -rf ruffle && mkdir ruffle
curl -fsSL https://registry.npmjs.org/@ruffle-rs/ruffle/-/ruffle-$(RUFFLE_VERSION).tgz | tar xz -C ruffle --strip-components=1
@ls ruffle/ruffle.js
clean:
rm -f bbs
.PHONY: all bbs test install clean doors-image proto phone-data ruffle