summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2000-11-06 12:00:00 +0000
committerrepogen <>2000-11-06 12:00:00 +0000
commit8cb71cb5548e3138e5d4e4744f52c79d9fafb116 (patch)
tree25859eb162c67eafc46866e0ec3a9a7ebf93157a /Makefile
parentb7610da5fed99f59ac73ae452da8839a0f2c1bda (diff)
downloadlua-github-8cb71cb5548e3138e5d4e4744f52c79d9fafb116.tar.gz
Lua 4.04.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 33 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index bd67221b..adf018f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,41 @@
-# makefile for lua hierarchy
+# makefile for Lua hierarchy
+# see INSTALL for installation instructions
+# see file "config" for customization instructions
-all co clean klean:
+LUA= .
+
+include $(LUA)/config
+
+# primary targets (only "all" and "clean" are useful after distribution)
+all clean co klean:
cd include; $(MAKE) $@
cd src; $(MAKE) $@
cd src/luac; $(MAKE) $@
cd src/lib; $(MAKE) $@
cd src/lua; $(MAKE) $@
+# remove debug information from binaries
strip:
- strip bin/lua*
+ strip bin/lua bin/luac
+
+# official installation
+install: all strip
+ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN)
+ $(INSTALL_EXEC) bin/* $(INSTALL_BIN)
+ $(INSTALL_DATA) include/*.h $(INSTALL_INC)
+ $(INSTALL_DATA) lib/lib* $(INSTALL_LIB)
+ $(INSTALL_DATA) doc/*.1 $(INSTALL_MAN)
+
+# shared libraries (for Linux)
+so:
+ ld -o lib/liblua.so.$V -shared src/*.o
+ ld -o lib/liblualib.so.$V -shared src/lib/*.o
+ cd lib; ln -s liblua.so.$V liblua.so; ln -s liblualib.so.$V liblualib.so
+
+# binaries using shared libraries
+sobin:
+ rm -f bin/lua bin/luac
+ cd src/lua; $(MAKE)
+ cd src/luac; $(MAKE)
+
+# (end of Makefile)