lua-users home
lua-l archive

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


> small tweaks I have detailed above. I have attached a patch file to this
> post to make the detailed changes for anyone running OS X (now macOS).

I'm running OS X 10.11.6 and the only change I need is replacing "-shared"
with "-bundle -undefined dynamic_lookup" in lua-5.3.4-tests/libs/makefile.
The compiler is Apple LLVM version 8.0.0 (clang-800.0.42.1).

The attached Makefile works fine. Put it in an empty folder and run the
commands below:

make get lua 
make basic complete
make debug

# Makefile for running Lua tests

PLAT= macosx
V= lua-5.3.4
R=
W= ftp

N= $V$R
LUA_DIR= ../$V/src
LUA= $(LUA_DIR)/lua
T= $V-tests

GET= wget
GET= curl -R -O

basic:
	cd $T; $(LUA) -e'_U=true' all.lua

complete:
	cd $T; $(MAKE) -C libs LUA_DIR=../$(LUA_DIR)
	cd $T; $(LUA) -e'_U=true' all.lua

internal: debug basic complete

debug:
	cd $T; cp -f ltests/* $(LUA_DIR)
	cd $T; $(MAKE) -C $(LUA_DIR) MYCFLAGS='-DLUA_USER_H='"'"'"ltests.h"'"'" LUA_O="lua.o ltests.o" clean $(PLAT)

get:
	$(GET) http://www.lua.org/$W/$N.tar.gz
	$(GET) http://www.lua.org/tests/$N-tests.tar.gz
	tar zxf $N.tar.gz
	tar zxf $N-tests.tar.gz

lua:
	cd $V; make $(PLAT)

clean:
	cd $V; make clean