forked from cloudwu/lua-mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (22 loc) · 755 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
27
28
29
30
31
32
33
LUALIB=-I/usr/local/include -L/usr/local/bin -llua52
SOCKETLIB=-lws2_32
.PHONY: all win linux
all :
@echo Please do \'make PLATFORM\' where PLATFORM is one of these:
@echo win linux
win: mongo.dll bson.dll md5.dll
linux: mongo.so bson.so md5.so
mongo.dll : lua-mongo.c lua-socket.c
gcc --shared -Wall -g $^ -o$@ $(LUALIB) $(SOCKETLIB)
bson.dll : lua-bson.c
gcc --shared -Wall -g $^ -o$@ $(LUALIB) $(SOCKETLIB)
md5.dll : lua-md5.c
gcc --shared -Wall -g $^ -o$@ $(LUALIB) $(SOCKETLIB)
mongo.so : lua-mongo.c lua-socket.c
gcc --shared -Wall -fPIC -g $^ -o$@
bson.so : lua-bson.c
gcc --shared -Wall -fPIC -g $^ -o$@
md5.so : lua-md5.c
gcc --shared -Wall -fPIC -g $^ -o$@
clean:
rm -f mongo.dll bson.dll md5.dll mongo.so bson.so md5.so