mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 12:08:21 +01:00
It just creates the distribution now.
Updated for LuaSocket 1.2
This commit is contained in:
parent
6370be578b
commit
7674d3b649
@ -1,73 +1,16 @@
|
||||
#--------------------------------------------------------------------------
|
||||
# LuaSocket makefile
|
||||
# Test executable for socklib
|
||||
# Diego Nehab, 29/8/1999
|
||||
# Distribution makefile
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
# don't echo commands
|
||||
# .SILENT:
|
||||
|
||||
CXX = g++
|
||||
CC = gcc
|
||||
|
||||
DIST = luasocket-1.1
|
||||
|
||||
WARNINGS = -Wall -Wshadow -Wpointer-arith -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
|
||||
|
||||
CFLAGS = $(WARNINGS) -D_DEBUG -O2
|
||||
|
||||
LUA = /home/diego/lib/lua
|
||||
LUALIB = $(LUA)/lib
|
||||
LUAINC = $(LUA)/include
|
||||
|
||||
INC = -I$(LUAINC)
|
||||
# LIB = $(LUA_LIB)/liblualib.a $(LUA_LIB)/liblua.a -lm -lsocket -lnsl
|
||||
# LIB = $(LUA_LIB)/liblualib.a $(LUA_LIB)/liblua.a -lm -lnsl
|
||||
LIB = $(LUALIB)/liblualib.a $(LUALIB)/liblua.a -lm
|
||||
DIST = luasocket-1.2
|
||||
|
||||
SRC = ~diego/tec/luasocket
|
||||
OBJ = /tmp
|
||||
DEP = /tmp
|
||||
|
||||
# list of .cpp files
|
||||
c_sources = luasocket.c lua.c
|
||||
|
||||
# corresponding .o files
|
||||
c_objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(c_sources))))
|
||||
|
||||
# binary depends on objects
|
||||
luasocket: $(c_objects)
|
||||
$(CC) $(CPPFLAGS) -o $@ $(c_objects) $(LIB)
|
||||
|
||||
# rule to create them
|
||||
$(c_objects): $(OBJ)/%.o: $(SRC)/%.c
|
||||
$(CC) -c $(CFLAGS) $(INC) -o $@ $<
|
||||
|
||||
# corresponding .d files
|
||||
c_deps = $(addprefix $(DEP)/, $(addsuffix .d, $(basename $(c_sources))))
|
||||
|
||||
# makefile depend on them...
|
||||
makefile : $(c_deps)
|
||||
|
||||
# ... since it includes them
|
||||
-include $(c_deps)
|
||||
|
||||
# rule to create them
|
||||
$(c_deps) : $(DEP)/%.d : $(SRC)/%.c
|
||||
$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(INC) $< \
|
||||
| sed '\''s%\($*\.o\)%$@ $(OBJ)/\1%'\'' > $@; \
|
||||
[ -s $@ ] || rm -f $@'
|
||||
|
||||
# clean all trash
|
||||
clean:
|
||||
rm -f $(OBJ)/*.o
|
||||
rm -f $(DEP)/*.d
|
||||
rm -f luasocket core
|
||||
|
||||
dist:
|
||||
mkdir -p $(DIST)/lua
|
||||
mkdir -p $(DIST)/examples
|
||||
mkdir -p $(DIST)/html
|
||||
mkdir -p $(DIST)/test
|
||||
cp -vf *.c $(DIST)
|
||||
cp -vf *.h $(DIST)
|
||||
cp -vf makefile $(DIST)
|
||||
@ -77,5 +20,12 @@ dist:
|
||||
cp -vf examples/*.lua $(DIST)/examples
|
||||
cp -vf examples/README $(DIST)/examples
|
||||
cp -vf html/manual.html $(DIST)/html
|
||||
cp -vf html/lua.png $(DIST)/html
|
||||
cp -vf html/vim.png $(DIST)/html
|
||||
cp -vf html/anybrowser.png $(DIST)/html
|
||||
cp -vf test/testclnt.lua $(DIST)/test
|
||||
cp -vf test/testsrvr.lua $(DIST)/test
|
||||
cp -vf test/testcmd.lua $(DIST)/test
|
||||
cp -vf test/README $(DIST)/test
|
||||
tar -zcvf $(DIST).tar.gz $(DIST)
|
||||
zip -r $(DIST).zip $(DIST)
|
||||
|
Loading…
Reference in New Issue
Block a user