-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_all
33 lines (26 loc) · 920 Bytes
/
makefile_all
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
.PHONY: all
all: oj_server compile_server webserver
CC=g++
CFLAGS=-std=c++11 -Wall -g
INCLUDE=-I./oj_server -I./comm
LIB=-lpthread -lmysqlcppconn
OBJS=./oj_server/oj_server.o ./oj_server/oj_model.o ./oj_model2.o \
./oj_server/oj_control.o ./oj_server/oj_view.o \
./comm/util.o ./comm/log.o ./comm/httplib.o \
./compile_server/compile_server.o ./compile_server/compiler.o \
./compile_server/compile_run.o ./compile_server/runner.o \
./webserver.o ./config.o ./http/http_conn.o \
./CGImysql/sql_connection_pool.o ./lock/locker.o \
./log/log.o ./timer/lst_timer.o ./threadpool/threadpool.o
oj_server:
make -C oj_server
compile_server:
make -C compile_server
webserver: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LIB)
%.o:%.cpp
$(CC) $(CFLAGS) -c $< -o $@ $(INCLUDE)
clean:
make clean -C oj_server
make clean -C compile_server
rm -rf ./webserver *.o