Add generate to the go.mod
This commit is contained in:
parent
a691e7add6
commit
7385e0870e
|
@ -2,7 +2,5 @@
|
|||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/luajit" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/luajit/luajit" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
6
generate.go
Normal file
6
generate.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
//go:build exclude
|
||||
|
||||
package luajit
|
||||
|
||||
//go:generate cp -r ../include ./include
|
||||
//go:generate cp -r ../lib ./lib
|
|
@ -1,24 +1,21 @@
|
|||
package luajit
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -I${SRCDIR}/luajit
|
||||
#cgo windows LDFLAGS: -L${SRCDIR}/luajit -llua51
|
||||
#cgo !windows LDFLAGS: -L${SRCDIR}/luajit -lluajit
|
||||
#cgo CFLAGS: -I${SRCDIR}/include
|
||||
#cgo windows LDFLAGS: -L${SRCDIR}/lib -llua51
|
||||
#cgo !windows LDFLAGS: -L${SRCDIR}/lib -lluajit
|
||||
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
#include <lauxlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void init_dll_paths(void);
|
||||
|
||||
static int do_string(lua_State *L, const char *s) {
|
||||
int status = luaL_loadstring(L, s);
|
||||
if (status) return status;
|
||||
return lua_pcall(L, 0, LUA_MULTRET, 0);
|
||||
}
|
||||
|
||||
|
||||
static int do_file(lua_State *L, const char *filename) {
|
||||
int status = luaL_loadfile(L, filename);
|
||||
if (status) return status;
|
||||
|
|
Loading…
Reference in New Issue
Block a user