forked from lizj3624/https-github.com-mogutt-TTServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 850 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (39 loc) · 850 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
38
39
40
41
42
43
44
45
46
47
#基本
CC = g++
CFLAGS=-Wall -Wno-deprecated -g -O2
LDFLAGS= -lpthread
LN=/bin/ln -s
AR=ar
CP=/bin/cp
RM=-/bin/rm -rf
ARCH=PC
#链接库名
LIB_NAME=
#链接库版本
LIB_VER=1.0.0
# 二进制目标
BIN=msfs
#源文件目录
SrcDir= . common http storage
#头文件目录
IncDir= . include/common include/http include/storage
#连接库目录
LibDir=
SRCS=$(foreach dir,$(SrcDir),$(wildcard $(dir)/*.cpp))
INCS=$(foreach dir,$(IncDir),$(addprefix -I,$(dir)))
LINKS=$(foreach dir,$(LibDir),$(addprefix -L,$(dir)))
CFLAGS := $(CFLAGS) $(INCS)
LDFLAGS:= $(LINKS) $(LDFLAGS)
OBJS = $(SRCS:%.cpp=%.o)
.PHONY:all clean
all:$(BIN)
$(BIN):$(OBJS)
$(CC) -o $(BIN) $(OBJS) $(LDFLAGS)
@echo " OK!\tComplie $@ "
%.o:%.cpp
@echo "Compileing $@..."
@$(CC) $(CFLAGS) -c $< -o $@
.PHONY: clean
clean:
@echo "Cleaning files..."
@$(RM) $(OBJS) $(BIN)