It just creates the distribution now.

Updated for LuaSocket 1.2
This commit is contained in:
Diego Nehab 2001-01-25 21:49:48 +00:00
parent 6370be578b
commit 7674d3b649

View File

@ -1,73 +1,16 @@
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# LuaSocket makefile # Distribution makefile
# Test executable for socklib
# Diego Nehab, 29/8/1999
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# don't echo commands DIST = luasocket-1.2
# .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
SRC = ~diego/tec/luasocket 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: dist:
mkdir -p $(DIST)/lua mkdir -p $(DIST)/lua
mkdir -p $(DIST)/examples mkdir -p $(DIST)/examples
mkdir -p $(DIST)/html mkdir -p $(DIST)/html
mkdir -p $(DIST)/test
cp -vf *.c $(DIST) cp -vf *.c $(DIST)
cp -vf *.h $(DIST) cp -vf *.h $(DIST)
cp -vf makefile $(DIST) cp -vf makefile $(DIST)
@ -77,5 +20,12 @@ dist:
cp -vf examples/*.lua $(DIST)/examples cp -vf examples/*.lua $(DIST)/examples
cp -vf examples/README $(DIST)/examples cp -vf examples/README $(DIST)/examples
cp -vf html/manual.html $(DIST)/html 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) tar -zcvf $(DIST).tar.gz $(DIST)
zip -r $(DIST).zip $(DIST) zip -r $(DIST).zip $(DIST)