-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
48 lines (42 loc) · 1.05 KB
/
makefile
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
# Default target
all: install generate
# Create a virtual environment
.PHONY: venv
venv:
python3 -m venv venv
# Install dependencies
.PHONY: install
install: venv
@echo "Installing dependencies"
. venv/bin/activate && venv/bin/pip install -r requirements.txt
# Update dependencies
.PHONY: update
update: venv
@echo "Updating dependencies"
. venv/bin/activate && venv/bin/pip install --upgrade -r requirements.txt
# Generate headers
.PHONY: generate
generate: venv
@echo "Generating Headers"
. venv/bin/activate && \
cd c && \
./c_header_cbor.py && \
./c_header_coap.py && \
./c_header_http.py
# Clean
.PHONY: clean
clean:
@echo "Cleaning generated files"
rm -rf ./c/cache/*
rm -rf ./c/src/*
# Help target
.PHONY: help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " install : Create virtual environment and install dependencies"
@echo " update : Update project dependencies"
@echo " generate : Generate headers"
@echo " clean : Clean generated files"
@echo " help : Display this help message"