-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 674 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 674 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
37
CC = gcc
CFLAGS = -Wall -Wextra -Werror -pedantic -g
LDLIBS = -lpthread -lcurl -lcrypto
# -std=c99
server: queue.o server.o util.o
$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
server.o: server.c util.h queue.h
$(CC) $(CFLAGS) -c $< -o $@
util.o: util.c util.h
$(CC) $(CFLAGS) -c $< -o $@
queue.o: queue.c queue.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f server *.o
clearcache:
rm -rf ./cache/*
run: server
gnome-terminal -- bash -c "./server 8080 30; exec bash"
debug: server
gnome-terminal -- bash -c "gdb -ex run --args ./server 8080 30; exec bash"
push:
ifndef COMMIT_MSG
$(error COMMIT_MSG is not set)
endif
git add .
git commit -m "$(COMMIT_MSG)"
git push