diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..13330e85ba --- /dev/null +++ b/Makefile @@ -0,0 +1,108 @@ +CSC = gmcs +RESC = resgen2 +CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe +DEFINES = DEBUG;TRACE +OUTDIR = bin + + + +FF_defines = $(DEFINES) +FF_prefix = OpenRa.FileFormats +FF_flags = $(CSFLAGS) +FF_program = OpenRa.FileFormats.dll +FF_libs = System.dll \ + System.Core.dll \ + System.Drawing.dll \ + System.Xml.dll +FF_type = library +FF_dirs = . \ + Support \ + Collections \ + Properties +FF_outpath = $(OUTDIR)/$(FF_program) +FF_refs := $(patsubst %,-r:%, $(FF_libs)) +FF_files := $(foreach dir, $(FF_dirs),$(wildcard $(FF_prefix)/$(dir)/*.cs)) + + + +GL_defines = $(DEFINES) +GL_prefix = OpenRa.Gl +GL_flags = $(CSFLAGS) +GL_program = OpenRa.Gl.dll +GL_libs = System.dll \ + System.Core.dll \ + System.Drawing.dll \ + System.Windows.Forms.dll \ + System.Xml.Linq.dll \ + System.Data.DataSetExtensions.dll \ + System.Data.dll \ + System.Xml.dll \ + thirdparty/Tao/Tao.Cg.dll \ + thirdparty/Tao/Tao.OpenGl.dll \ + thirdparty/Tao/Tao.Platform.Windows.dll +GL_type = library +GL_dirs = . \ + Properties +GL_outpath = $(OUTDIR)/$(GL_program) +GL_refs := $(patsubst %,-r:%, $(GL_libs)) +GL_files := $(foreach dir, $(GL_dirs),$(wildcard $(GL_prefix)/$(dir)/*.cs)) + + + +RA_defines = $(DEFINES);SANITY_CHECKS +RA_prefix = OpenRa.Game +RA_flags = $(CSFLAGS) -win32icon:$(RA_prefix)/OpenRa.ico -platform:x86 +RA_program = OpenRa.Game.exe +RA_libs = System.dll \ + System.Core.dll \ + System.Drawing.dll \ + System.Data.dll \ + System.Windows.Forms.dll \ + System.Xml.dll \ + bin/OpenRa.FileFormats.dll \ + bin/OpenRa.Gl.dll \ + thirdparty/Tao/Tao.OpenAl.dll +RA_type = winexe +RA_dirs = . \ + Effects \ + GameRules \ + Graphics \ + Network \ + Orders \ + Properties \ + Support \ + Traits \ + Traits/Activities \ + Traits/AI \ + Traits/Attack \ + Traits/Modifiers \ + Traits/Player \ + Traits/Render \ + Traits/SupportPowers \ + Traits/World +RA_outpath = $(OUTDIR)/$(RA_program) +RA_refs := $(patsubst %,-r:%, $(RA_libs)) +RA_files := $(foreach dir, $(RA_dirs),$(wildcard $(RA_prefix)/$(dir)/*.cs)) +RA_resources = Resources +RA_resources_path = $(RA_prefix)/$(RA_resources) + + + + +all: $(FF_program) $(GL_program) $(RA_program) + +$(FF_program) : $(FF_files) + $(CSC) $(FF_refs) "-out:$(FF_outpath)" $(FF_flags) "-define:$(FF_defines)" -t:$(FF_type) $(FF_files) + +$(GL_program) : $(GL_files) + $(CSC) $(GL_refs) "-out:$(GL_outpath)" $(GL_flags) "-define:$(GL_defines)" -t:$(GL_type) $(GL_files) + cp thirdparty/Tao/Tao.OpenGl.dll bin/ + cp thirdparty/Tao/Tao.Cg.dll bin/ + cp thirdparty/Tao/Tao.Platform.Windows.dll bin/ + +$(RA_resources) : + $(RESC) $(RA_resources_path).resx + +$(RA_program) : $(RA_files) $(RA_resources) $(FF_program) $(GL_program) + $(CSC) $(RA_refs) "-out:$(RA_outpath)" $(RA_flags) "-define:$(RA_defines)" -t:$(RA_type) -res:$(RA_resources_path).resources,OpenRa.Resources.resources $(RA_files) + cp thirdparty/Tao/Tao.OpenAl.dll bin/ diff --git a/OpenRa.FileFormats/Makefile b/OpenRa.FileFormats/Makefile deleted file mode 100644 index 4d2e853fc5..0000000000 --- a/OpenRa.FileFormats/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -CSC = gmcs -CFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe -DEFINE = DEBUG;TRACE -PROGRAM = OpenRa.FileFormats.dll -LIBS = System.dll \ - System.Core.dll \ - System.Drawing.dll \ - System.Xml.dll -TYPE = library -DIRS = . \ - Support \ - Collections \ - Properties - -refs := $(foreach ref, $(LIBS),-r:$(ref)) -files := $(foreach dir, $(DIRS),$(wildcard $(dir)/*.cs)) - -$(PROGRAM) : - $(CSC) $(refs) "-out:$(PROGRAM)" $(CFLAGS) "-define:$(DEFINE)" -t:$(TYPE) $(files) diff --git a/OpenRa.Game/Resources.resx b/OpenRa.Game/Resources.resx index 93da84b731..0c877b02cd 100644 --- a/OpenRa.Game/Resources.resx +++ b/OpenRa.Game/Resources.resx @@ -1,4 +1,4 @@ - + + diff --git a/OpenRa.Game/SharedResources.cs b/OpenRa.Game/SharedResources.cs deleted file mode 100644 index efc22425dd..0000000000 --- a/OpenRa.Game/SharedResources.cs +++ /dev/null @@ -1,13 +0,0 @@ -using IjwFramework.Types; -using OpenRa.FileFormats; - -namespace OpenRa.Game -{ - class SharedResources - { - static Lazy rules = new Lazy( - () => new IniFile( FileSystem.Open( "rules.ini" ))); - - public static IniFile Rules { get { return rules.Value; } } - } -} diff --git a/thirdparty/Tao/Tao.Cg.dll b/thirdparty/Tao/Tao.Cg.dll new file mode 100644 index 0000000000..9d1bd7c388 Binary files /dev/null and b/thirdparty/Tao/Tao.Cg.dll differ diff --git a/thirdparty/Tao/Tao.OpenAl.dll b/thirdparty/Tao/Tao.OpenAl.dll new file mode 100644 index 0000000000..c45c0d083c Binary files /dev/null and b/thirdparty/Tao/Tao.OpenAl.dll differ diff --git a/thirdparty/Tao/Tao.OpenGl.dll b/thirdparty/Tao/Tao.OpenGl.dll new file mode 100644 index 0000000000..8eb040e654 Binary files /dev/null and b/thirdparty/Tao/Tao.OpenGl.dll differ diff --git a/thirdparty/Tao/Tao.Platform.Windows.dll b/thirdparty/Tao/Tao.Platform.Windows.dll new file mode 100644 index 0000000000..dea153db43 Binary files /dev/null and b/thirdparty/Tao/Tao.Platform.Windows.dll differ