From e1677d21954f864aff8ddd563059c3e8fd83cd4f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 9 Feb 2018 03:45:17 -0800 Subject: [PATCH] Updated to take lua as a parameter to make. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 21056a4..761f11d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ # makefile for immutable table library for Lua +# usage: make LUA=/path/to/lua -# change these to reflect your Lua installation -LUA= /users/Bruce/Sandbox/Lua/lua-5.3.4 LUAINC= $(LUA)/src LUALIB= $(LUA)/src LUABIN= $(LUA)/src @@ -38,13 +37,19 @@ so: $T $T: $(OBJS) $(MAKESO) -o $@ $(OBJS) -$(OBJS): limmutable.c +$(OBJS): check-lua limmutable.c clean: - rm -f $(OBJS) $T core core.* + rm -f $(OBJS) $T lua_path core core.* doc: @echo "$(MYNAME) library:" @fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column +check-lua: + @if [ "$(LUA)" = "" ]; then \ + echo "usage: make LUA=/path/to/lua"; \ + exit 1; \ + fi + # eof