blob: e72fac00cceea74ecc1c1f65cbb9125ad659c6d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Build
Standalone CRDOP (**MAX25-SoftModem** — MAX25-SoftModem) — embedded `vendor/ardopcf/`, no submodules.
## Requirements
- CMake ≥ 3.16
- **GCC** or **Clang / LLVM**
- Platform libraries (see table below)
- Optional tests: **cmocka** (Linux, *BSD)
## Platform matrix (tested)
| OS | Toolchain | Audio / libs | Status |
|----|-----------|----------------|--------|
| **Linux** | GCC, Clang | `libasound2-dev`, `pkg-config` | tested |
| **FreeBSD** | GCC, Clang | `alsa-lib`, `pkgconf` | tested |
| **OpenBSD / NetBSD** | GCC, Clang | `alsa-lib` if available | experimental |
| **Windows** | MinGW-w64, MSVC | WinMM (built-in) | **untested** |
| **macOS** | Clang (Xcode) | CoreAudio (built-in) | **untested** |
Other operating systems are not tested.
### Debian / Ubuntu
```bash
sudo apt install build-essential cmake libasound2-dev pkg-config
sudo apt install libcmocka-dev # optional unit tests
```
### FreeBSD
```bash
pkg install cmake alsa-lib pkgconf cmocka
```
### macOS
```bash
xcode-select --install
# or: brew install cmake
```
### Windows (MinGW-w64 on Linux host)
```bash
sudo apt install mingw-w64
CRDOP_TOOLCHAIN=x86_64-w64-mingw32 ./scripts/build-crdop.sh
# → build/crdopc.exe
```
Native Windows: Visual Studio 2022+ with CMake, or MSYS2 MinGW.
## Build
```bash
./scripts/build-crdop.sh
CC=clang ./scripts/build-crdop.sh
./scripts/test-all.sh # smoke + cmocka (Unix)
```
Output: `build/crdopc` (Windows: `build/crdopc.exe`)
## Install
```bash
./scripts/install-crdop.sh # → /usr/local
CRDOP_PREFIX=$HOME/.local ./scripts/install-crdop.sh
```
Installs:
| Path | Contents |
|------|----------|
| `bin/crdopc` | Modem binary |
| `bin/crdop` | Profile launcher (`scripts/crdopc`) |
| `share/crdop/` | INI examples, `VERSION` |
Run: `crdop` or `CRDOP_INI=~/.config/crdop/crdop.ini crdop`
## Cross-compile (Linux host)
```bash
CRDOP_TOOLCHAIN=aarch64-linux-gnu ./scripts/build-crdop.sh
CRDOP_TOOLCHAIN=arm-linux-gnueabihf ./scripts/build-crdop.sh
CRDOP_TOOLCHAIN=x86_64-w64-mingw32 ./scripts/build-crdop.sh
```
## Troubleshooting
| Problem | Fix |
|---------|-----|
| `vendor/ardopcf missing` | Full repo checkout |
| No ALSA (Linux/BSD) | Install dev package / `alsa-lib` port |
| macOS build fails | Xcode CLI tools; CMake ≥ 3.16 |
| Tests skipped | Install cmocka dev package |
| Stale build | `rm -rf build && ./scripts/build-crdop.sh` |
Vendor refresh (maintainers): `./scripts/refresh-vendor-ardopcf.sh`
|