Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
117 lines (94 loc) · 4.11 KB
/
Copy pathMakefile
File metadata and controls
117 lines (94 loc) · 4.11 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
ifeq ($(origin CC), default)
CC := m68k-amigaos-gcc
endif
CFLAGS ?= -Os -Wall -Wextra -Werror -m68000 -Iinclude
LDFLAGS ?=
TARGET := AmBot
SOURCES := src/main.c src/net.c src/irc.c src/events.c src/commands.c src/operations.c src/rexx.c src/hooks.c src/config.c src/modules.c src/networks.c src/modernirc.c src/multinet.c src/botai.c src/session.c
OBJECTS := $(SOURCES:.c=.o)
HEADERS := include/ambot.h include/net.h include/irc.h include/events.h include/commands.h include/operations.h include/rexx.h include/hooks.h include/config.h include/modules.h include/networks.h include/modernirc.h include/multinet.h include/botai.h include/session.h
.PHONY: all clean check check-botai check-pbmp amiga qualify-m9_2 check-m9_2 preflight-m9_2 review-m9_2-evidence run-m9_2-host run-m9_2-tls check-m9_3 audit-m9_3 package-m9_3 prepare-publish-m9_3 publish-preflight-m9_3
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
src/%.o: src/%.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
check-botai:
@mkdir -p build/tests
@cc -std=c11 -Wall -Wextra -Werror -Iinclude tests/test_botai.c src/botai.c -o build/tests/test_botai
@build/tests/test_botai
check-pbmp:
@mkdir -p build/tests
@cc -std=c11 -Wall -Wextra -Werror -Iinclude tests/test_pbmp.c src/pbmp.c -o build/tests/test_pbmp
@build/tests/test_pbmp
check: check-botai check-pbmp
@test -f src/modernirc.c
@test -f include/modernirc.h
@test -f docs/M8.md
@test -f examples/AmBot-Modern.cfg
@test -f src/botai.c
@test -f include/botai.h
@grep -Fq "BOTAI_URL" src/config.c
@grep -Fq "\"AI\"" src/commands.c
@grep -Fq "AMBOT_BOTAI_RESPONSE_MAX" include/botai.h
@echo "M8 + optional BotAI static checks: PASS"
clean:
rm -f $(OBJECTS) $(TARGET)
check-m9_2:
@python3 -m py_compile ci/m9_2/fixture_server.py ci/m9_2/tls_proxy.py ci/m9_2/tls_fixture.py
@test -f ci/m9_2/AmBot-M9_2.cfg.in
@test -f ci/m9_2/AmBot-SASL-Failure-M9_2.cfg.in
@test -f ci/m9_2/AmBot-Permanent-Failure-M9_2.cfg.in
@test -f ci/m9_2/rexx/Permanent-Failure-M9_2.rexx
@test -f ci/m9_2/amiga/Permanent-Failure-M9_2
@test -f ci/m9_2/rexx/Commands-M9_2.rexx
@test -f ci/m9_2/rexx/ON_PRIVMSG.rexx
@test -f ci/m9_2/rexx/ON_NOTICE.rexx
@test -f ci/m9_2/rexx/SASL-Failure-M9_2.rexx
@test -f ci/m9_2/amiga/SASL-Failure-M9_2
@test -f ci/m9_2/amiga/AmBNC-Plain-M9_2
@test -f ci/m9_2/amiga/AmBNC-TLS-M9_2
@test -f ci/m9_2/rexx/AmBNC-Plain-M9_2.rexx
@test -f ci/m9_2/rexx/AmBNC-TLS-M9_2.rexx
@test -f ci/m9_2/AmBNC-AmBot-M9_2.cfg.in
@test -f ci/m9_2/AmBNC-AmBot-TLS-M9_2.cfg.in
@grep -Fq "TLS_MODE=PROXY" ci/m9_2/AmBNC-AmBot-TLS-M9_2.cfg.in
@test -f ci/m9_2/AmBot-via-AmBNC-M9_2.cfg
@grep -Fq "TLS=OFF" ci/m9_2/AmBot-via-AmBNC-M9_2.cfg
@test -f ci/m9_2/AmBot-via-AmBNC-TLS-M9_2.cfg
@grep -Fq "AMBNC_PORT=16669" ci/m9_2/AmBot-via-AmBNC-TLS-M9_2.cfg
@grep -Fq "TLS=UPSTREAM" ci/m9_2/AmBot-via-AmBNC-TLS-M9_2.cfg
@test -f ci/m9_2/AMBNC_INTEGRATION.md
@grep -Fq "typedef int (*ambot_irc_line_cb)" include/irc.h
@grep -Fq "if (runtime->sock < 0) return 1;" src/multinet.c
@test -f ci/m9_2/summarize-evidence.sh
@test -f ci/m9_2/amigaos-template.fs-uae
@echo "M9.2 harness static checks: PASS"
amiga: all
@echo "AmBot native AmigaOS binary ready: $(TARGET)"
qualify-m9_2: all
@sh ci/m9_2/prepare.sh
preflight-m9_2:
@bash ci/m9_2/preflight.sh
review-m9_2-evidence:
@sh ci/m9_2/summarize-evidence.sh
run-m9_2-host:
@bash ci/m9_2/run-host-fixture.sh
run-m9_2-tls:
@bash ci/m9_2/run-tls-transport.sh
check-m9_3:
@bash -n ci/m9_3/release-gate.sh ci/m9_3/package-release.sh ci/m9_3/audit-release.sh ci/m9_3/prepare-publish.sh ci/m9_3/publish-preflight.sh
@test -f ci/m9_3/RELEASE_NOTES.md.in
@test -f ci/m9_3/audit-release.sh
@test -f docs/M9_3_RELEASE.md
@echo "M9.3 packaging static checks: PASS"
audit-m9_3: check-m9_3
@bash ci/m9_3/audit-release.sh
package-m9_3: check-m9_3
@bash ci/m9_3/package-release.sh
prepare-publish-m9_3: check-m9_3
@test -n "$(VERSION)" || (echo "VERSION=vX.Y.Z required" >&2; exit 2)
@bash ci/m9_3/prepare-publish.sh "$(VERSION)"
publish-preflight-m9_3: check-m9_3
@test -n "$(VERSION)" || (echo "VERSION=vX.Y.Z required" >&2; exit 2)
@bash ci/m9_3/publish-preflight.sh "$(VERSION)"