mirror of
https://github.com/love2d/love.git
synced 2026-08-21 13:09:56 +02:00
Create liblove
This commit is contained in:
@@ -24,3 +24,4 @@
|
||||
./modules/thread/sdl/*
|
||||
./modules/thread/win32/*
|
||||
./modules/thread/posix/*
|
||||
./launcher.cpp
|
||||
|
||||
@@ -11,9 +11,13 @@ SUBDIRS =
|
||||
# LÖVE executable
|
||||
bin_PROGRAMS = love
|
||||
#love_LDFLAGS =
|
||||
#love_LDADD =
|
||||
love_LDADD = liblove.la
|
||||
love_SOURCES = launcher.cpp
|
||||
|
||||
love_SOURCES = \\" > Makefile.am.tmp
|
||||
# libLÖVE
|
||||
lib_LTLIBRARIES = liblove.la
|
||||
liblove_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS)
|
||||
liblove_la_SOURCES = \\" > Makefile.am.tmp
|
||||
find . \( \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" -o -iname "*.lch" \) \) -exec echo '{}' \\ \; >> Makefile.am.tmp
|
||||
cat Makefile.am.tmp | grep -v -f"../platform/unix/exclude" | head -c -3 > Makefile.am
|
||||
#head -c -3 Makefile.am.tmp > Makefile.am
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2012 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
#include <common/config.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern int lovemain(int argc, char **argv);
|
||||
}
|
||||
|
||||
#ifdef LOVE_BUILD_EXE
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return lovemain(argc, argv);
|
||||
}
|
||||
#endif // LOVE_BUILD_EXE
|
||||
+10
-6
@@ -284,9 +284,16 @@ _GLIBCXX_END_NAMESPACE
|
||||
|
||||
#endif // LOVE_LEGENDARY_LIBSTDCXX_HACK
|
||||
|
||||
#ifdef LOVE_BUILD_EXE
|
||||
namespace love
|
||||
{
|
||||
void boot(lua_State *L)
|
||||
{
|
||||
if (luaL_loadbuffer(L, (const char *)love::boot_lua, sizeof(love::boot_lua), "boot.lua") == 0)
|
||||
lua_call(L, 0, 0);
|
||||
}
|
||||
} // love
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
extern "C" LOVE_EXPORT int lovemain(int argc, char ** argv)
|
||||
{
|
||||
#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
|
||||
int hack_argc = 0;
|
||||
@@ -345,9 +352,7 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
|
||||
// Boot
|
||||
if (luaL_loadbuffer(L, (const char *)love::boot_lua, sizeof(love::boot_lua), "boot.lua") == 0)
|
||||
lua_call(L, 0, 0);
|
||||
|
||||
love::boot(L);
|
||||
lua_close(L);
|
||||
|
||||
#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
|
||||
@@ -361,4 +366,3 @@ int main(int argc, char ** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // LOVE_BUILD_EXE
|
||||
|
||||
Reference in New Issue
Block a user