-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
54 lines (40 loc) · 1.47 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
# $Id: Makefile,v 1.14 2008/04/04 02:01:01 mascarenhas Exp $
include config
DESTDIR := /
LDIR := $(DESTDIR)/$(LUA_DIR)
WDIR := $(DESTDIR)/$(LUA_DIR)/wsapi
CDIR := $(DESTDIR)/$(LUA_LIBDIR)
BDIR := $(DESTDIR)/$(BIN_DIR)
all: cgi fastcgi
cgi:
config:
touch config
fastcgi: src/fastcgi/lfcgi.so
fcgi: fastcgi
src/fastcgi/lfcgi.so: src/fastcgi/lfcgi.h
$(CC) $(CFLAGS) $(LDFLAGS) $(LIB_OPTION) -o src/fastcgi/lfcgi.so src/fastcgi/lfcgi.c -lfcgi $(INC)
install:
@mkdir -p $(LDIR) $(WDIR) $(BDIR)
@cp src/*.lua $(LDIR)
@cp src/wsapi/*.lua $(WDIR)
@cp src/launcher/wsapi.cgi $(BDIR)
@cp src/launcher/wsapi.fcgi $(BDIR)
@echo "Installing of Lua WSAPI part is done!"
install-fcgi:
@mkdir -p $(CDIR)
@cp src/fastcgi/lfcgi.so $(CDIR)
@echo "Installing of bundled Lua-fcgi lib is done!"
install-rocks: install
mkdir -p $(PREFIX)/samples
cp -r samples/* $(PREFIX)/samples
mkdir -p $(PREFIX)/doc
cp -r doc/* $(PREFIX)/doc
clean:
@rm -f config src/fastcgi/lfcgi.so
@echo "Cleaning is done!"
snapshot:
git archive --format=tar --prefix=wsapi-$(VERSION)/ HEAD | gzip > wsapi-$(VERSION).tar.gz
rockspecs:
for pkg in wsapi wsapi-fcgi wsapi-xavante ; do cp rockspec/$$pkg-$(VERSION_OLD)-1.rockspec rockspec/$$pkg-$(VERSION_NEW)-1.rockspec ; done
for pkg in wsapi wsapi-fcgi wsapi-xavante; do sed -e "s/$(VERSION_OLD)/$(VERSION_NEW)/g" -i "" rockspec/$$pkg-$(VERSION_NEW)-1.rockspec ; done
for pkg in wsapi wsapi-fcgi wsapi-xavante; do git add rockspec/$$pkg-$(VERSION_NEW)-1.rockspec ; done