lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


A fix I reported for the 5.0.1 Makefile hasn't been applied to 5.0.2; here
it is again, and I'd be interested to know if there are any problems with
it:

--- cut here ---
diff -Naur lua-5.0.1/Makefile lua-5.0.1patched/Makefile
--- lua-5.0.1/Makefile	2003-04-11 02:34:38.000000000 +0200
+++ lua-5.0.1patched/Makefile	2004-01-30 18:55:51.000000000 +0100
@@ -38,8 +38,8 @@

 # shared libraries (for Linux)
 so:
-	ld -o lib/liblua.so.$V -shared src/*.o
-	ld -o lib/liblualib.so.$V -shared src/lib/*.o
+	$(CC) $(MYCFLAGS) -o lib/liblua.so.$V -shared src/*.o
+	$(CC) $(MYCFLAGS) -o lib/liblualib.so.$V -shared src/lib/*.o -lm -ldl -llua
 	cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so

 # binaries using shared libraries
--- cut here ---

To remind readers, what this does is make the shared libraries be linked
dynamically against all their dependencies (rather than statically as
with the original version).

Since this fix is Linux-specific (the so rule is only intended for Linux)
it doesn't need testing on other platforms.

-- 
http://www.mupsych.org/~rrt/ | The only person worth beating is yourself