Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trying a gyp-based build system.

  • Loading branch information...
commit 0746692d081e4d93caad178acdf29f9fa4751f61 1 parent 08d4e14
@stephank authored
View
35 .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
@@ -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
@@ -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
View
22 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"
+ ]
+ }
+ ]
+}
View
14 Core/package.gyp
@@ -0,0 +1,14 @@
+{
+ "includes": ["../common.gypi"],
+ "targets": [
+ {
+ "target_name": "Core",
+ "type": "none",
+ "direct_dependent_settings": {
+ "libraries": [
+ "-lCore"
+ ]
+ }
+ }
+ ]
+}
View
21 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"
+ ]
+ }
+ ]
+}
View
21 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"
+ ]
+ }
+ ]
+}
View
14 Engine/package.gyp
@@ -0,0 +1,14 @@
+{
+ "includes": ["../common.gypi"],
+ "targets": [
+ {
+ "target_name": "Engine",
+ "type": "none",
+ "direct_dependent_settings": {
+ "libraries": [
+ "-lEngine"
+ ]
+ }
+ }
+ ]
+}
View
21 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" ]
+ }]
+ ]
+ }
+ ]
+}
View
23 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"
+ ]
+ }
+ ]
+}
View
20 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"
+ ]
+ }
+ ]
+}
View
24 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" ]
+ }]
+ ]
+ }
+ ]
+}
View
16 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"
+ ]
+ }
+ ]
+}
View
123 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
+ }
+ }
+ }]
+ ]
+ }
+ }
+ }
+}
View
25 surreal.gyp
@@ -0,0 +1,25 @@
+# Dummy target that simply depends on packages.
+{
+ "targets": [
+ {
+ "target_name": "RootMeta",
+ "type": "none",
+ "dependencies": [
+ "MiniLaunch/package.gyp:*",
+ "SDLLaunch/package.gyp:*",
+ "SDLDrv/package.gyp:*",
+ "OpenGLDrv/package.gyp:*",
+ "ALAudio/package.gyp:*",
+ "UCC/package.gyp:*"
+ ],
+ "conditions": [
+ ["OS == 'win'", {
+ "dependencies": [
+ "D3DDrv/package.gyp:*"
+ "D3D9Drv/package.gyp:*"
+ ]
+ }]
+ ]
+ }
+ ]
+}
Please sign in to comment.
Something went wrong with that request. Please try again.