-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (34 loc) · 976 Bytes
/
Makefile
File metadata and controls
38 lines (34 loc) · 976 Bytes
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
cc = gcc
cflags = -Wall -Wextra -Werror -pedantic -std=gnu99
ldflags = -lcurl
BIN=venv/bin/
all: build
build:
@$(cc) $(cflags) -o main main.c $(ldflags)
@echo compiled and built executable
@python3 -m venv venv
@echo created virtual environment
$(BIN)pip install -r requirements.txt
@echo installed python dependencies
@echo run ./main [get\|post] to start the client
@echo "run 'make shell' or 'source venv/bin/activate && python3 shell.py' to start the shell"
@echo run make clean to clean up
@echo done!
compile:
@$(cc) $(cflags) -o main main.c $(ldflags)
@echo compiled and built executable
@echo run ./main [get\|post] to start the client
@echo "run 'make shell' or 'source venv/bin/activate && python3 shell.py' to start the shell"
run:
./main post & $(BIN)python3 shell.py
@echo done
shell:
$(BIN)python3 shell.py
client:
./main post
clean:
@rm -f main
@echo removed executable
@rm -rf venv
@echo removed virtual environment
@echo cleaned up