Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.59 KB
/
Copy pathMakefile
File metadata and controls
43 lines (35 loc) · 1.59 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
VIXC := /home/zty/Vix-lang/build/vixc
BUILD_DIR := build
AGENT := $(BUILD_DIR)/vagent
AGENT_DEPS := $(shell find -L agent/vstd agent/vlibcurl -type f -name '*.vix')
.PHONY: all build run test ownership-check clean
all: build
build: $(AGENT)
$(AGENT): agent/main.vix $(AGENT_DEPS) $(VIXC)
@mkdir -p $(BUILD_DIR)
$(VIXC) agent/main.vix -lcurl -o $(AGENT)
run: $(AGENT)
$(AGENT)
test: $(AGENT)
@mkdir -p $(BUILD_DIR)
$(VIXC) tests/test_agent_config.vix -o $(BUILD_DIR)/test_agent_config
$(BUILD_DIR)/test_agent_config
$(VIXC) tests/test_agent_json.vix -o $(BUILD_DIR)/test_agent_json
$(BUILD_DIR)/test_agent_json
$(VIXC) tests/test_agent_history.vix -o $(BUILD_DIR)/test_agent_history
$(BUILD_DIR)/test_agent_history
$(VIXC) tests/test_agent_no_key.vix -o $(BUILD_DIR)/test_agent_no_key
env -u DEEPSEEK_API_KEY $(BUILD_DIR)/test_agent_no_key
env DEEPSEEK_API_KEY=fixture-token $(AGENT) </dev/null >/dev/null
python3 tests/test_agent_pty.py $(AGENT)
ownership-check:
@mkdir -p $(BUILD_DIR)
@status=0; \
$(VIXC) --ownership-check agent/main.vix -lcurl -o $(BUILD_DIR)/vix-agent-ownership || status=$$?; \
$(VIXC) --ownership-check tests/test_agent_config.vix -o $(BUILD_DIR)/test_agent_config_ownership || status=$$?; \
$(VIXC) --ownership-check tests/test_agent_json.vix -o $(BUILD_DIR)/test_agent_json_ownership || status=$$?; \
$(VIXC) --ownership-check tests/test_agent_history.vix -o $(BUILD_DIR)/test_agent_history_ownership || status=$$?; \
$(VIXC) --ownership-check tests/test_agent_no_key.vix -o $(BUILD_DIR)/test_agent_no_key_ownership || status=$$?; \
exit $$status
clean:
rm -rf $(BUILD_DIR)