diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2001-01-25 21:49:48 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2001-01-25 21:49:48 +0000 |
| commit | 7674d3b649af95d43a0b43aa900d48fc8d2a381f (patch) | |
| tree | 95d93b7cb0ddd14e295e2b9432a9b46ae5b69f27 | |
| parent | 6370be578b27f60bcfa1a89980602511974203e3 (diff) | |
| download | luasocket-7674d3b649af95d43a0b43aa900d48fc8d2a381f.tar.gz luasocket-7674d3b649af95d43a0b43aa900d48fc8d2a381f.tar.bz2 luasocket-7674d3b649af95d43a0b43aa900d48fc8d2a381f.zip | |
It just creates the distribution now.
Updated for LuaSocket 1.2
| -rw-r--r-- | makefile.dist | 70 |
1 files changed, 10 insertions, 60 deletions
diff --git a/makefile.dist b/makefile.dist index 19a3775..1d8df38 100644 --- a/makefile.dist +++ b/makefile.dist | |||
| @@ -1,73 +1,16 @@ | |||
| 1 | #-------------------------------------------------------------------------- | 1 | #-------------------------------------------------------------------------- |
| 2 | # LuaSocket makefile | 2 | # Distribution makefile |
| 3 | # Test executable for socklib | ||
| 4 | # Diego Nehab, 29/8/1999 | ||
| 5 | #-------------------------------------------------------------------------- | 3 | #-------------------------------------------------------------------------- |
| 6 | 4 | ||
| 7 | # don't echo commands | 5 | DIST = luasocket-1.2 |
| 8 | # .SILENT: | ||
| 9 | |||
| 10 | CXX = g++ | ||
| 11 | CC = gcc | ||
| 12 | |||
| 13 | DIST = luasocket-1.1 | ||
| 14 | |||
| 15 | WARNINGS = -Wall -Wshadow -Wpointer-arith -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs | ||
| 16 | |||
| 17 | CFLAGS = $(WARNINGS) -D_DEBUG -O2 | ||
| 18 | |||
| 19 | LUA = /home/diego/lib/lua | ||
| 20 | LUALIB = $(LUA)/lib | ||
| 21 | LUAINC = $(LUA)/include | ||
| 22 | |||
| 23 | INC = -I$(LUAINC) | ||
| 24 | # LIB = $(LUA_LIB)/liblualib.a $(LUA_LIB)/liblua.a -lm -lsocket -lnsl | ||
| 25 | # LIB = $(LUA_LIB)/liblualib.a $(LUA_LIB)/liblua.a -lm -lnsl | ||
| 26 | LIB = $(LUALIB)/liblualib.a $(LUALIB)/liblua.a -lm | ||
| 27 | 6 | ||
| 28 | SRC = ~diego/tec/luasocket | 7 | SRC = ~diego/tec/luasocket |
| 29 | OBJ = /tmp | ||
| 30 | DEP = /tmp | ||
| 31 | |||
| 32 | # list of .cpp files | ||
| 33 | c_sources = luasocket.c lua.c | ||
| 34 | |||
| 35 | # corresponding .o files | ||
| 36 | c_objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(c_sources)))) | ||
| 37 | |||
| 38 | # binary depends on objects | ||
| 39 | luasocket: $(c_objects) | ||
| 40 | $(CC) $(CPPFLAGS) -o $@ $(c_objects) $(LIB) | ||
| 41 | |||
| 42 | # rule to create them | ||
| 43 | $(c_objects): $(OBJ)/%.o: $(SRC)/%.c | ||
| 44 | $(CC) -c $(CFLAGS) $(INC) -o $@ $< | ||
| 45 | |||
| 46 | # corresponding .d files | ||
| 47 | c_deps = $(addprefix $(DEP)/, $(addsuffix .d, $(basename $(c_sources)))) | ||
| 48 | |||
| 49 | # makefile depend on them... | ||
| 50 | makefile : $(c_deps) | ||
| 51 | |||
| 52 | # ... since it includes them | ||
| 53 | -include $(c_deps) | ||
| 54 | |||
| 55 | # rule to create them | ||
| 56 | $(c_deps) : $(DEP)/%.d : $(SRC)/%.c | ||
| 57 | $(SHELL) -ec '$(CC) -MM $(CFLAGS) $(INC) $< \ | ||
| 58 | | sed '\''s%\($*\.o\)%$@ $(OBJ)/\1%'\'' > $@; \ | ||
| 59 | [ -s $@ ] || rm -f $@' | ||
| 60 | |||
| 61 | # clean all trash | ||
| 62 | clean: | ||
| 63 | rm -f $(OBJ)/*.o | ||
| 64 | rm -f $(DEP)/*.d | ||
| 65 | rm -f luasocket core | ||
| 66 | 8 | ||
| 67 | dist: | 9 | dist: |
| 68 | mkdir -p $(DIST)/lua | 10 | mkdir -p $(DIST)/lua |
| 69 | mkdir -p $(DIST)/examples | 11 | mkdir -p $(DIST)/examples |
| 70 | mkdir -p $(DIST)/html | 12 | mkdir -p $(DIST)/html |
| 13 | mkdir -p $(DIST)/test | ||
| 71 | cp -vf *.c $(DIST) | 14 | cp -vf *.c $(DIST) |
| 72 | cp -vf *.h $(DIST) | 15 | cp -vf *.h $(DIST) |
| 73 | cp -vf makefile $(DIST) | 16 | cp -vf makefile $(DIST) |
| @@ -77,5 +20,12 @@ dist: | |||
| 77 | cp -vf examples/*.lua $(DIST)/examples | 20 | cp -vf examples/*.lua $(DIST)/examples |
| 78 | cp -vf examples/README $(DIST)/examples | 21 | cp -vf examples/README $(DIST)/examples |
| 79 | cp -vf html/manual.html $(DIST)/html | 22 | cp -vf html/manual.html $(DIST)/html |
| 23 | cp -vf html/lua.png $(DIST)/html | ||
| 24 | cp -vf html/vim.png $(DIST)/html | ||
| 25 | cp -vf html/anybrowser.png $(DIST)/html | ||
| 26 | cp -vf test/testclnt.lua $(DIST)/test | ||
| 27 | cp -vf test/testsrvr.lua $(DIST)/test | ||
| 28 | cp -vf test/testcmd.lua $(DIST)/test | ||
| 29 | cp -vf test/README $(DIST)/test | ||
| 80 | tar -zcvf $(DIST).tar.gz $(DIST) | 30 | tar -zcvf $(DIST).tar.gz $(DIST) |
| 81 | zip -r $(DIST).zip $(DIST) | 31 | zip -r $(DIST).zip $(DIST) |
