4 #if defined(LUA_USE_LINUX)
6 #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
7 -#define LUA_USE_READLINE /* needs some extra libraries */
10 #if defined(LUA_USE_MACOSX)
13 @@ -17,6 +17,7 @@ LIBS= -lm $(MYLIBS)
19 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
21 @@ -86,7 +87,7 @@ echo:
22 @echo "MYLIBS = $(MYLIBS)"
24 # convenience targets for popular platforms
26 +RFLAG=$(if $(USE_READLINE),-DLUA_USE_READLINE)
28 @echo "Please choose a platform:"
30 @@ -101,16 +102,16 @@ bsd:
31 $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
34 - $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
35 + $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E$(if $(USE_READLINE), -lreadline)"
41 - $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
42 + $(MAKE) all MYCFLAGS+="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline -lhistory -lncurses)"
45 - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
46 + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX $(if $(USE_READLINE), MYLIBS="-lreadline")
47 # use this on Mac OS X 10.3-
48 # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX