Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

linux build

  • Loading branch information...
commit 186ae0dbaaaf415073978e92bb81f37adb8ac3b6 1 parent 643ef59
@grrrwaaa authored
View
18 lakefile
@@ -1,14 +1,25 @@
+-- cd libuv
+-- make CFLAGS="-fPIC"
+-- cd ../
+-- mv libuv/uv.a <plat>/lib/libuv.a
+
UV_INCLUDE_DIR = "libuv/include"
UV_LIBS = "uv"
local libflags
+local needs = { "uv", "lua" }
+
if PLAT == "Darwin" then
UV_LIB_DIR = "osx/lib"
libflags = "-framework Cocoa"
else
- UV_LIB_DIR = "/usr/local/lib"
+ UV_LIB_DIR = "linux64/lib"
+
+ PTHREAD_DIR = '/usr/'
+ PTHREAD_LIBS = 'pthread rt'
+ needs[#needs+1] = "pthread"
end
cpp.shared{
@@ -23,8 +34,7 @@ cpp.shared{
"lua_uv_fs.cpp",
"lua_uv_dns.cpp",
},
- needs = { "uv", "lua" },
+ needs = needs,
+ flags = "-Wno-unknown-pragmas",
libflags = libflags,
}
-
-target('install', 'uv', 'sudo cp $(DEPENDS) /usr/local/lib/lua/5.1/$(DEPENDS)')
View
BIN  linux64/lib/libuv.a
Binary file not shown
View
5 lua_uv_fs.cpp
@@ -1,5 +1,8 @@
#include "luaopen_uv.h"
#include <fcntl.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
int lua_uv_string_to_flags(lua_State* L, const char* string) {
if (strcmp(string, "r") == 0) return O_RDONLY;
@@ -333,4 +336,4 @@ void init_fs_metatable(lua_State * L, int loopidx) {
LUA_UV_CLOSURE(uv_fs, read);
LUA_UV_CLOSURE(uv_fs, write);
lua_pop(L, 1);
-}
+}
View
1  luaopen_uv.cpp
@@ -12,6 +12,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include "luaopen_uv.h"
+#include <stdlib.h>
#include <string.h>
int lua_uv_loop___tostring(lua_State * L) {
Please sign in to comment.
Something went wrong with that request. Please try again.