-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
26 lines (19 loc) · 863 Bytes
/
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
CC = clang
CFLAGS = -lm -Wall -Wextra -O2 -static
# files
SOURCES = simple-server.c epoll-server.c uring-server.c
TARGETS = simple epoll uring
all: $(TARGETS)
# Regras específicas para cada arquivo
simple: simple-server.c
$(CC) -o simple-server simple-server.c request-handle.c cpu-bound.c $(CFLAGS)
# $(CC) $(CFLAGS) -o $@ $< -DFILE1_DEFINE
epoll: epoll-server.c
$(CC) -o epoll-server epoll-server.c threadpool.c request-handle.c cpu-bound.c $(CFLAGS) -pthread
# $(CC) $(CFLAGS) -o $@ $< -DFILE2_DEFINE -DADDITIONAL_FLAG
uring: uring-server.c
$(CC) -o uring-server uring-server.c threadpool.c request-handle.c cpu-bound.c $(CFLAGS) -pthread -I/usr/local/include -L/usr/local/lib -luring
# # $(CC) $(CFLAGS) -g -o $@ $< -DFILE3_DEFINE -lm
# # musl-gcc -o rest_server rest_server.c -I/usr/local/include -L/usr/local/lib -luring
clean:
rm -f $(TARGETS)