Skip to content

Commit

Permalink
Trying a gyp-based build system.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ste´phan Kochen committed May 12, 2012
1 parent 08d4e14 commit 0746692
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .gitignore
@@ -1,19 +1,10 @@
# Full installation files.
.manifest
NetGamesUSA.com
System/Surreal
System/UnrealTournament
System/ucc
System/*-bin
System/*.u
System/*.int
System/*.ini
System/*.so*
System/*.log
System/*.exe
System/*.exp
System/*.ilk
System/*.lib
System/*.dll
Help/*.txt
Help/*.ico
Help/*.bmp
Expand All @@ -26,11 +17,6 @@ Web/*.uhtm
Web/*.uhtm
Web/**/*.uhtm
Web/**/*.gif
*/release-*
*/debug-*
*/Src/Release
*/Src/Debug
*/Lib
README
README.Loki
README.bonus.pack.collection
Expand All @@ -42,6 +28,25 @@ ucc
uninstall
ut
ut.xpm

# Generated project files.
Makefile
*.Makefile
*.mk
*.sln
*.suo
*.ncb
*.vcproj.*

# Build products.
out
System/Surreal
System/UnrealTournament
System/ucc
System/*.so*
System/*.u
System/*.exe
System/*.lib
System/*.dll
System/*.exp
System/*.ilk
22 changes: 22 additions & 0 deletions ALAudio/package.gyp
@@ -0,0 +1,22 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "ALAudio",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"libraries": [
"-lopenal",
"-lalure",
"-lmikmod"
],
"sources": [
"Src/ALAudio.cpp",
"Src/ALAudioSubsystem.cpp",
"Src/ALAudioMusic.cpp"
]
}
]
}
14 changes: 14 additions & 0 deletions Core/package.gyp
@@ -0,0 +1,14 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "Core",
"type": "none",
"direct_dependent_settings": {
"libraries": [
"-lCore"
]
}
}
]
}
21 changes: 21 additions & 0 deletions D3D9Drv/package.gyp
@@ -0,0 +1,21 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "D3D9Drv",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"libraries": [
"-lwinmm",
"-ld3dx9",
"-ladvapi32"
],
"sources": [
"Src/D3D9Drv.cpp",
"Src/D3D9.cpp"
]
}
]
}
21 changes: 21 additions & 0 deletions D3DDrv/package.gyp
@@ -0,0 +1,21 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "D3DDrv",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"libraries": [
"-lDxGuid",
"-ld3dim"
],
"sources": [
"Src/D3DDrv.cpp",
"Src/Direct3D7.cpp",
"Src/und3d.cpp"
]
}
]
}
14 changes: 14 additions & 0 deletions Engine/package.gyp
@@ -0,0 +1,14 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "Engine",
"type": "none",
"direct_dependent_settings": {
"libraries": [
"-lEngine"
]
}
}
]
}
21 changes: 21 additions & 0 deletions MiniLaunch/package.gyp
@@ -0,0 +1,21 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "MiniLaunch",
"type": "executable",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"sources": [
"Src/MiniLaunch.cpp"
],
"conditions": [
["OS == 'win'", {
"libraries": [ "-lwinmm" ]
}]
]
}
]
}
23 changes: 23 additions & 0 deletions OpenGLDrv/package.gyp
@@ -0,0 +1,23 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "OpenGLDrv",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"defines": [
"UTGLR_UT_BUILD=1"
],
"libraries": [
"-lSDL"
],
"sources": [
"Src/OpenGLDrv.cpp",
"Src/OpenGL.cpp",
"Src/c_gclip.cpp"
]
}
]
}
20 changes: 20 additions & 0 deletions SDLDrv/package.gyp
@@ -0,0 +1,20 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "SDLDrv",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"libraries": [
"-lSDL"
],
"sources": [
"Src/SDLDrv.cpp",
"Src/SDLClient.cpp",
"Src/SDLViewport.cpp"
]
}
]
}
24 changes: 24 additions & 0 deletions SDLLaunch/package.gyp
@@ -0,0 +1,24 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "SDLLaunch",
"type": "executable",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"libraries": [
"-lSDL",
],
"sources": [
"Src/SDLLaunch.cpp"
],
"conditions": [
["OS == 'win'", {
"libraries": [ "-lSDLmain" ]
}]
]
}
]
}
16 changes: 16 additions & 0 deletions UCC/package.gyp
@@ -0,0 +1,16 @@
{
"includes": ["../common.gypi"],
"targets": [
{
"target_name": "UCC",
"type": "executable",
"dependencies": [
"../Core/package.gyp:*",
"../Engine/package.gyp:*"
],
"sources": [
"Src/UCC.cpp"
]
}
]
}
123 changes: 123 additions & 0 deletions common.gypi
@@ -0,0 +1,123 @@
{
"variables": {
# Build shared libraries by default.
"library%": "shared_library",
# This is a silly hack to delay path transformation until after including,
# but before dependent settings are merged.
"package_includes": "Inc"
},

"target_defaults": {
"type": "<(library)",
"product_prefix": '',

"include_dirs": [ "<(package_includes)" ],
"all_dependent_settings": {
"include_dirs": [ "<(package_includes)" ]
},

"conditions": [
["library == 'static_library'", {
"defines": [ "__STATIC_LINK=1" ]
}],
["OS == 'linux'", {
"cflags": [
"-O2", "-Werror", "-D_REENTRANT",
# FIXME: offsetof is incorrectly used to set a C++ UProperty.
"-Wno-error=invalid-offsetof",
# FIXME: some APIs (SDL_putenv, mikmod) incorrectly don't take const char*.
"-Wno-error=write-strings"
],
"defines": [
"__LINUX__",
"GPackage=GPackage>(_target_name)"
],
"conditions": [
["_type == 'shared_library'", {
"cflags": [ "-fPIC" ]
}]
]
}],
["OS == 'win'", {
"defines": [
"WIN32",
"ThisPackage=>(_target_name)"
],
"conditions": [
["_type == 'shared_library'", {
"defines": [ "_DLL" ]
}]
],
"msvs_cygwin_shell": 0,
"msvs_settings": {
"VCCLCompilerTool": {
"StructMemberAlignment": 3,
"BufferSecurityCheck": "false",
"FloatingPointModel": 2,
"TreatWChar_tAsBuiltInType": "false",
"WarningLevel": 4,
"SuppressStartupBanner": "true"
},
"VCLinkerTool": {
"SuppressStartupBanner": "true",
"GenerateMapFile": "true",
"RandomizedBaseAddress": 1,
"DataExecutionPrevention": 0,
"TargetMachine": 1
}
}
}]
],

"default_configuration": "Release",
"configurations": {
"Debug": {
"defines": [ "_REALLY_WANT_DEBUG" ],
"conditions": [
["OS == 'linux'", {
"cflags": [ "-ggdb" ]
}],
["OS == 'win'", {
"msvs_settings": {
"VCCLCompilerTool": {
"Optimization": 1,
"InlineFunctionExpansion": 0,
"MinimalRebuild": "true",
"BasicRuntimeChecks": 0,
"RuntimeLibrary": 1,
"DebugInformationFormat": 3
},
"VCLinkerTool": {
"LinkIncremental": 2,
"GenerateDebugInformation": "true"
}
}
}]
]
},
"Release": {
"conditions": [
["OS == 'linux'", {
"cflags": [ "-fomit-frame-pointer" ]
}],
["OS == 'win'", {
"msvs_settings": {
"VCCLCompilerTool": {
"Optimization": 2,
"InlineFunctionExpansion": 1,
"StringPooling": "true",
"RuntimeLibrary": 0,
"EnableFunctionLevelLinking": "true",
"AssemblerOutput": 4,
"DebugInformationFormat": 0
},
"VCLinkerTool": {
"LinkIncremental": 1
}
}
}]
]
}
}
}
}

0 comments on commit 0746692

Please sign in to comment.