Skip to content

Instantly share code, notes, and snippets.

@brimworks
Created October 24, 2011 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brimworks/1308155 to your computer and use it in GitHub Desktop.
Save brimworks/1308155 to your computer and use it in GitHub Desktop.
Get luvit to build on OS-X
diff --git a/Makefile b/Makefile
index b4fef80..59bd580 100644
--- a/Makefile
+++ b/Makefile
@@ -58,8 +58,8 @@ ${GENDIR}:
${LUADIR}/src/libluajit.a:
git submodule update --init ${LUADIR}
- sed -e "s/#XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT/XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT/" -i deps/luajit/src/Makefile
- sed -e "s/#XCFLAGS+= -DLUA_USE_APICHECK/XCFLAGS+= -DLUA_USE_APICHECK/" -i deps/luajit/src/Makefile
+ sed -e "s/#XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT/XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT/" -i '' deps/luajit/src/Makefile
+ sed -e "s/#XCFLAGS+= -DLUA_USE_APICHECK/XCFLAGS+= -DLUA_USE_APICHECK/" -i '' deps/luajit/src/Makefile
$(MAKE) -C ${LUADIR}
${UVDIR}/uv.a:
@@ -81,7 +81,7 @@ ${BUILDDIR}/%.o: src/%.c src/%.h deps
$(CC) -Wall -Werror -c $< -o $@ -I${HTTPDIR} -I${UVDIR}/include -I${LUADIR}/src -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
${BUILDDIR}/luvit: ${GENDIR} ${ALLLIBS}
- $(CC) -o ${BUILDDIR}/luvit ${ALLLIBS} -Wall -lm -ldl -lrt -lpthread -Wl,-E
+ $(CC) -o ${BUILDDIR}/luvit ${ALLLIBS} -Wall -lm -ldl -lpthread -framework Carbon -framework CoreServices
clean:
make -C ${LUADIR} clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment