-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
77 lines (70 loc) · 1.77 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
####################################
# Automatically generated by SMake #
# https://github.com/kala13x/smake #
####################################
CFLAGS = -D_XUTILS_USE_SSL -g -O2 -Wall -D_XUTILS_DEBUG -D_XUTILS_USE_GNU -D_ASSERT_TIMED
CFLAGS += -I./src/crypt -I./src/data -I./src/net -I./src/sys -I./src
LIBS = -lssl -lcrypto -lpthread
NAME = libxutils.a
ODIR = ./build
OBJ = o
OBJS = xver.$(OBJ) \
aes.$(OBJ) \
base64.$(OBJ) \
crc32.$(OBJ) \
crypt.$(OBJ) \
hmac.$(OBJ) \
md5.$(OBJ) \
rsa.$(OBJ) \
sha256.$(OBJ) \
sha1.$(OBJ) \
array.$(OBJ) \
hash.$(OBJ) \
jwt.$(OBJ) \
list.$(OBJ) \
map.$(OBJ) \
xbuf.$(OBJ) \
xjson.$(OBJ) \
xstr.$(OBJ) \
addr.$(OBJ) \
event.$(OBJ) \
http.$(OBJ) \
mdtp.$(OBJ) \
ntp.$(OBJ) \
rtp.$(OBJ) \
sock.$(OBJ) \
api.$(OBJ) \
ws.$(OBJ) \
sync.$(OBJ) \
pool.$(OBJ) \
thread.$(OBJ) \
xcli.$(OBJ) \
xcpu.$(OBJ) \
xfs.$(OBJ) \
xlog.$(OBJ) \
xsig.$(OBJ) \
xtime.$(OBJ) \
xtop.$(OBJ) \
xtype.$(OBJ) \
OBJECTS = $(patsubst %,$(ODIR)/%,$(OBJS))
INSTALL_INC = /usr/local/include/xutils
INSTALL_BIN = /usr/local/lib
VPATH = ./src:./src/sys:./src/net:./src/data:./src/crypt
.c.$(OBJ):
@test -d $(ODIR) || mkdir -p $(ODIR)
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
$(NAME):$(OBJS)
$(AR) rcs -o $(ODIR)/$(NAME) $(OBJECTS)
.PHONY: install
install:
@test -d $(INSTALL_BIN) || mkdir -p $(INSTALL_BIN)
install -m 0755 $(ODIR)/$(NAME) $(INSTALL_BIN)/
@test -d $(INSTALL_INC) || mkdir -p $(INSTALL_INC)
cp -r ./src/crypt/*.h $(INSTALL_INC)/
cp -r ./src/data/*.h $(INSTALL_INC)/
cp -r ./src/net/*.h $(INSTALL_INC)/
cp -r ./src/sys/*.h $(INSTALL_INC)/
cp -r ./src/*.h $(INSTALL_INC)/
.PHONY: clean
clean:
$(RM) $(ODIR)/$(NAME) $(OBJECTS)