-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 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
#CC=clang
CFLAGS= -DHTML_301='"301_Moved_Permanently.html"' \
-DHTML_403='"403_Forbidden.html"' \
-DHTML_404='"404_Not_Found.html"' \
-DHTML_500='"500_Internal_Error.html"' \
-DHTML_501='"501_Method_Not_Implemented.html"' \
-DDEBUG \
# -DINCaPACHE_6_1
# -DPRETEND_TO_BE_ROOT \
# -g3 -O0 -Wall -pedantic \
-DIMAGE='"uncadunca.jpg"' \
-DSTYLE='"000_style.css"'
OBJS=incApache_aux.o incApache_http.o incApache_main.o incApache_threads.o
BIN_DIR=bin
EXE=$(BIN_DIR)/incapache
.PHONY: clean tgz
all: $(EXE)
$(EXE): $(OBJS) $(BIN_DIR)
$(CC) $(CFLAGS) -o $(EXE) $(OBJS) -lpthread
sudo chown root $(EXE)
sudo chmod u+s $(EXE)
incApache_aux.o: incApache_aux.c incApache.h
incApache_http.o: incApache_http.c incApache.h
incApache_main.o: incApache_main.c incApache.h
incApache_threads.o: incApache_threads.c incApache.h
clean:
rm -f $(OBJS) $(EXE)
tgz: clean
cd .. ; tar cvzf incapache-students.tgz --exclude=incapache-students/bin/Debug --exclude=incapache-students/.idea incapache-students
$(BIN_DIR):
mkdir -p $(BIN_DIR)