-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake4.lua
More file actions
executable file
·114 lines (100 loc) · 3.7 KB
/
Copy pathpremake4.lua
File metadata and controls
executable file
·114 lines (100 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
solution "FenrirEngine"
configurations { "Debug", "Release" }
platforms { "native" }
location "projects"
local INCLUDE_PATH = "/f/MinGW/include"
local LIB_PATH = "/f/MinGW/lib"
local SDL_PATH = "/f/dev/SDL-1.2.4"
local OPENAL_PATH = "/f/dev/OpenAL 1.1 SDK"
project "FenrirEngine"
kind "ConsoleApp"
language "C"
configuration { "gmake" }
if true == os.is("windows") then
buildoptions { "-Wall" }
defines { "__SDL__", "WIN32" }
files { "source/*.c", "source/sdl/*.c", "source/win/*.c",
"source/lua_wrap/*.c" }
includedirs {"include", "lib", "lib/lua", "lib/png",
SDL_PATH .. "/include", "/usr/local/include",
INCLUDE_PATH, OPENAL_PATH .. "/include" }
libdirs { SDL_PATH .. "/lib", "/usr/local/lib", LIB_PATH,
OPENAL_PATH .. "/libs/Win32" }
links { "mingw32", "SDLmain", "SDL", "opengl32", "openal32", "ws2_32",
"m", "z", "lua", "png", "ogg_vorbis" }
linkoptions { "-Wl,--subsystem,console", "-Wl,-u,_WinMain@16" }
elseif true == os.is("linux") then
buildoptions {"-Wall"}
defines {"__SDL__"}
files { "source/*.c", "source/sdl/*.c", "source/win/*.c",
"source/lua_wrap/*.c" }
includedirs {"include", "lib", "lib/lua", "lib/png", INCLUDE_PATH }
libdirs { LIB_PATH }
links {"SDLmain", "SDL", "GL", "openal", "m", "z", "lua", "png",
"ogg", "vorbis", "vorbisfile" }
end
configuration { "gmake", "Debug" }
defines { "DEBUG" }
buildoptions { "-gdwarf-2" }
configuration { "xcode3" }
files { "include/**.h", "source/*.c", "source/sdl/*.c", "source/osx/*.m",
"source/lua_wrap/*.c" }
buildoptions {"-Wall"}
defines {"__SDL__"}
includedirs {"include", "lib", "lib/lua", "lib/png",
"lib/freetype-2.4.3/include", INCLUDE_PATH }
libdirs { LIB_PATH }
links {"lua", "Cocoa.framework", "SDL.framework", "OpenGL.framework",
"OpenAL.framework", "m", "z", "png", "ogg_vorbis", "freetype" }
--[[ TODO: Needs to be updated (by someone that uses it). Compiler still needs
to be MinGW though ]]--
configuration { "vs2008", "vs2005" }
defines { "__SDL__", "WIN32", "_USE_MATH_DEFINES" }
files { "source/*.c", "source/sdl/*.c", "source/win/*.c",
"source/lua_wrap/*.c" }
includedirs {"include", "D:/dev/SDL-1.2.14/include/win32",
"D:/dev/lua-5.1.4-30/include",
"D:/dev/OpenAL 1.1 SDK/include" }
libdirs { "D:/dev/SDL-1.2.14/lib", "D:/dev/lua-5.1.4-30/lib",
"D:/dev/OpenAL 1.1 SDK/libs/Win32" }
links { "SDLmain", "opengl32", "openal32", "SDL" }
linkoptions { }
-- Dependencies
project "lua"
kind "StaticLib"
language "C"
files { "lib/lua/*.c" }
includedirs { "include" }
project "png"
kind "StaticLib"
language "C"
includedirs { INCLUDE_PATH }
files { "lib/png/*.c" }
if false == os.is("linux") then
project "ogg_vorbis"
kind "StaticLib"
language "C"
files { "lib/ogg/*.c", "lib/vorbis/**.c" }
includedirs { "lib/ogg", "lib/vorbis" }
end
project "freetype"
kind "StaticLib"
language "C"
defines { "DARWIN_NO_CARBON", "FT2_BUILD_LIBRARY" }
files {
"lib/freetype-2.4.3/src/autofit.c",
"lib/freetype-2.4.3/src/ftbase.c",
"lib/freetype-2.4.3/src/ftbbox.c",
"lib/freetype-2.4.3/src/ftbitmap.c",
"lib/freetype-2.4.3/src/ftcid.c",
"lib/freetype-2.4.3/src/ftdebug.c",
"lib/freetype-2.4.3/src/ftglyph.c",
"lib/freetype-2.4.3/src/ftinit.c",
"lib/freetype-2.4.3/src/ftsystem.c",
"lib/freetype-2.4.3/src/pshinter.c",
"lib/freetype-2.4.3/src/psnames.c",
"lib/freetype-2.4.3/src/sfnt.c",
"lib/freetype-2.4.3/src/smooth.c",
"lib/freetype-2.4.3/src/truetype.c",
}
includedirs { "lib/freetype-2.4.3/include" }