-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.37 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.37 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
.PHONY: help infra-up infra-down server-setup server-start edge-build edge-run clean
help:
@echo "Microkernel IoT Platform - Make Commands"
@echo ""
@echo "Infrastructure:"
@echo " make infra-up - Start Docker infrastructure (EMQ X + PostgreSQL)"
@echo " make infra-down - Stop Docker infrastructure"
@echo ""
@echo "Server (Elixir):"
@echo " make server-setup - Setup server dependencies and database"
@echo " make server-start - Start Phoenix server"
@echo ""
@echo "Edge (Zig):"
@echo " make edge-build - Build edge firmware (native)"
@echo " make edge-build-arm - Build edge firmware for ARM (Raspberry Pi)"
@echo " make edge-run - Run edge daemon"
@echo ""
@echo "Cleanup:"
@echo " make clean - Clean build artifacts"
infra-up:
docker-compose up -d
@echo "Waiting for services to be ready..."
@sleep 5
@echo "Infrastructure is ready!"
@echo "EMQ X Dashboard: http://localhost:18083 (admin/public)"
@echo "PostgreSQL: localhost:5432"
infra-down:
docker-compose down
server-setup:
cd server && mix deps.get && mix ecto.create && mix ecto.migrate
server-start:
cd server && mix phx.server
edge-build:
cd edge && zig build
edge-build-arm:
cd edge && zig build -Dtarget=arm-linux-gnueabihf -Doptimize=ReleaseSafe
edge-run:
cd edge && zig build run
clean:
cd edge && rm -rf zig-cache zig-out
cd server && rm -rf _build deps