Rework the makefile.
This commit is contained in:
221
Makefile
221
Makefile
@@ -1,23 +1,43 @@
|
|||||||
CSC = gmcs
|
CSC = gmcs
|
||||||
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
||||||
DEFINE = DEBUG;TRACE
|
DEFINE = DEBUG;TRACE
|
||||||
PROGRAMS = fileformats rcg rgl rnull game ra cnc seqed editor ralint filex tsbuild utility winlaunch
|
|
||||||
prefix = /usr/local
|
|
||||||
datarootdir = $(prefix)/share
|
|
||||||
datadir = $(datarootdir)
|
|
||||||
bindir = $(prefix)/bin
|
|
||||||
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
|
|
||||||
INSTALL_DIR = $(DESTDIR)$(datadir)/openra
|
|
||||||
INSTALL = install
|
|
||||||
INSTALL_PROGRAM = $(INSTALL)
|
|
||||||
|
|
||||||
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll
|
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll
|
||||||
|
PHONY = core tools package all mods clean distclean
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
core: game renderers mod_ra mod_cnc
|
||||||
|
tools: editor ralint seqed filex tsbuild utility
|
||||||
|
package: fixheader core editor utility
|
||||||
|
mods: mod_ra mod_cnc
|
||||||
|
all: core tools winlaunch
|
||||||
|
clean:
|
||||||
|
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
|
#
|
||||||
|
# Core binaries
|
||||||
|
#
|
||||||
fileformats_SRCS = $(shell find OpenRA.FileFormats/ -iname '*.cs')
|
fileformats_SRCS = $(shell find OpenRA.FileFormats/ -iname '*.cs')
|
||||||
fileformats_TARGET = OpenRA.FileFormats.dll
|
fileformats_TARGET = OpenRA.FileFormats.dll
|
||||||
|
#fileformats_DEPS = fixheader
|
||||||
fileformats_KIND = library
|
fileformats_KIND = library
|
||||||
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll thirdparty/ICSharpCode.SharpZipLib.dll
|
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll thirdparty/ICSharpCode.SharpZipLib.dll
|
||||||
|
PROGRAMS = fileformats
|
||||||
|
fileformats: $(fileformats_TARGET)
|
||||||
|
|
||||||
|
game_SRCS = $(shell find OpenRA.Game/ -iname '*.cs')
|
||||||
|
game_TARGET = OpenRA.Game.exe
|
||||||
|
game_KIND = winexe
|
||||||
|
game_DEPS = $(fileformats_TARGET)
|
||||||
|
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
|
||||||
|
thirdparty/Tao/Tao.OpenAl.dll thirdparty/Tao/Tao.FreeType.dll
|
||||||
|
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
|
||||||
|
PROGRAMS += game
|
||||||
|
game: $(game_TARGET)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Renderer dlls
|
||||||
|
#
|
||||||
rcg_SRCS = $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
|
rcg_SRCS = $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
|
||||||
rcg_TARGET = OpenRA.Renderer.Cg.dll
|
rcg_TARGET = OpenRA.Renderer.Cg.dll
|
||||||
rcg_KIND = library
|
rcg_KIND = library
|
||||||
@@ -40,66 +60,109 @@ rnull_KIND = library
|
|||||||
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
|
rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
|
||||||
$(rnull_DEPS) $(game_TARGET)
|
$(rnull_DEPS) $(game_TARGET)
|
||||||
|
PROGRAMS += rcg rgl rnull
|
||||||
|
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET)
|
||||||
|
|
||||||
game_SRCS = $(shell find OpenRA.Game/ -iname '*.cs')
|
#
|
||||||
game_TARGET = OpenRA.Game.exe
|
# Official Mods
|
||||||
game_KIND = winexe
|
#
|
||||||
game_DEPS = $(fileformats_TARGET)
|
# Red Alert
|
||||||
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
|
mod_ra_SRCS = $(shell find OpenRA.Mods.RA/ -iname '*.cs')
|
||||||
thirdparty/Tao/Tao.OpenAl.dll thirdparty/Tao/Tao.FreeType.dll
|
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
|
||||||
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
|
mod_ra_KIND = library
|
||||||
|
mod_ra_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
|
mod_ra_LIBS = $(COMMON_LIBS) $(mod_ra_DEPS)
|
||||||
|
PROGRAMS += mod_ra
|
||||||
|
mod_ra: $(mod_ra_TARGET)
|
||||||
|
# mono RALint.exe ra
|
||||||
|
|
||||||
ra_SRCS = $(shell find OpenRA.Mods.RA/ -iname '*.cs')
|
# Command and Conquer
|
||||||
ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
|
mod_cnc_SRCS = $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
|
||||||
ra_KIND = library
|
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
|
||||||
ra_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
mod_cnc_KIND = library
|
||||||
ra_LIBS = $(COMMON_LIBS) $(ra_DEPS)
|
mod_cnc_DEPS = $(fileformats_TARGET) $(game_TARGET) $(mod_ra_TARGET)
|
||||||
|
mod_cnc_LIBS = $(COMMON_LIBS) $(mod_cnc_DEPS)
|
||||||
cnc_SRCS = $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
|
PROGRAMS += mod_cnc
|
||||||
cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
|
mod_cnc: $(mod_cnc_TARGET)
|
||||||
cnc_KIND = library
|
# mono RALint.exe cnc
|
||||||
cnc_DEPS = $(fileformats_TARGET) $(game_TARGET) $(ra_TARGET)
|
|
||||||
cnc_LIBS = $(COMMON_LIBS) $(cnc_DEPS)
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tools
|
||||||
|
#
|
||||||
|
# Sequence editor (defunct)
|
||||||
seqed_SRCS = $(shell find SequenceEditor/ -iname '*.cs')
|
seqed_SRCS = $(shell find SequenceEditor/ -iname '*.cs')
|
||||||
seqed_TARGET = SequenceEditor.exe
|
seqed_TARGET = SequenceEditor.exe
|
||||||
seqed_KIND = winexe
|
seqed_KIND = winexe
|
||||||
seqed_DEPS = $(fileformats_TARGET)
|
seqed_DEPS = $(fileformats_TARGET)
|
||||||
seqed_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
|
seqed_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
|
||||||
seqed_EXTRA = -resource:SequenceEditor.Form1.resources
|
seqed_EXTRA = -resource:SequenceEditor.Form1.resources
|
||||||
|
PROGRAMS += seqed
|
||||||
|
SequenceEditor.Form1.resources:
|
||||||
|
resgen2 SequenceEditor/Form1.resx SequenceEditor.Form1.resources 1> /dev/null
|
||||||
|
seqed: SequenceEditor.Form1.resources $(seqed_TARGET)
|
||||||
|
|
||||||
|
# Map Editor
|
||||||
editor_SRCS = $(shell find OpenRA.Editor/ -iname '*.cs')
|
editor_SRCS = $(shell find OpenRA.Editor/ -iname '*.cs')
|
||||||
editor_TARGET = OpenRA.Editor.exe
|
editor_TARGET = OpenRA.Editor.exe
|
||||||
editor_KIND = winexe
|
editor_KIND = winexe
|
||||||
editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
|
editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
|
||||||
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
|
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
|
||||||
|
PROGRAMS += editor
|
||||||
|
OpenRA.Editor.MapSelect.resources:
|
||||||
|
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
|
||||||
|
OpenRA.Editor.Form1.resources:
|
||||||
|
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
|
||||||
|
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
|
||||||
|
|
||||||
|
# Analyses mod yaml for easy to detect errors
|
||||||
ralint_SRCS = $(shell find RALint/ -iname '*.cs')
|
ralint_SRCS = $(shell find RALint/ -iname '*.cs')
|
||||||
ralint_TARGET = RALint.exe
|
ralint_TARGET = RALint.exe
|
||||||
ralint_KIND = exe
|
ralint_KIND = exe
|
||||||
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
|
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
|
||||||
|
PROGRAMS += ralint
|
||||||
|
ralint: $(ralint_TARGET)
|
||||||
|
|
||||||
|
# Extracts files from packages (mixfiles, zips, etc)
|
||||||
filex_SRCS = $(shell find FileExtractor/ -iname '*.cs')
|
filex_SRCS = $(shell find FileExtractor/ -iname '*.cs')
|
||||||
filex_TARGET = FileExtractor.exe
|
filex_TARGET = FileExtractor.exe
|
||||||
filex_KIND = exe
|
filex_KIND = exe
|
||||||
filex_DEPS = $(fileformats_TARGET)
|
filex_DEPS = $(fileformats_TARGET)
|
||||||
filex_LIBS = $(COMMON_LIBS) $(filex_DEPS)
|
filex_LIBS = $(COMMON_LIBS) $(filex_DEPS)
|
||||||
|
PROGRAMS += filex
|
||||||
|
filex: $(filex_TARGET)
|
||||||
|
|
||||||
|
# Builds and exports tilesets from a bitmap
|
||||||
tsbuild_SRCS = $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
|
tsbuild_SRCS = $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
|
||||||
tsbuild_TARGET = TilesetBuilder.exe
|
tsbuild_TARGET = TilesetBuilder.exe
|
||||||
tsbuild_KIND = winexe
|
tsbuild_KIND = winexe
|
||||||
tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
|
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
|
||||||
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.Form1.resources
|
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.Form1.resources
|
||||||
|
PROGRAMS += tsbuild
|
||||||
|
OpenRA.TilesetBuilder.Form1.resources:
|
||||||
|
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
|
||||||
|
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Launchers / Utilities
|
||||||
|
#
|
||||||
|
# Patches binary headers to work around a mono bug
|
||||||
|
fixheader: packaging/fixheader.cs
|
||||||
|
@$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
|
||||||
|
PHONY += fixheader
|
||||||
|
|
||||||
|
# Backend for the launcher apps - queries game/mod info and applies actions to an install
|
||||||
utility_SRCS = $(shell find OpenRA.Utility/ -iname '*.cs')
|
utility_SRCS = $(shell find OpenRA.Utility/ -iname '*.cs')
|
||||||
utility_TARGET = OpenRA.Utility.exe
|
utility_TARGET = OpenRA.Utility.exe
|
||||||
utility_KIND = exe
|
utility_KIND = exe
|
||||||
utility_DEPS = $(fileformats_TARGET) thirdparty/ICSharpCode.SharpZipLib.dll
|
utility_DEPS = $(fileformats_TARGET) thirdparty/ICSharpCode.SharpZipLib.dll
|
||||||
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS)
|
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS)
|
||||||
|
PROGRAMS += utility
|
||||||
|
utility: $(utility_TARGET)
|
||||||
|
|
||||||
|
# Windows launcher
|
||||||
winlaunch_SRCS = $(shell find OpenRA.Launcher/ -iname '*.cs')
|
winlaunch_SRCS = $(shell find OpenRA.Launcher/ -iname '*.cs')
|
||||||
winlaunch_TARGET = OpenRA.Launcher.exe
|
winlaunch_TARGET = OpenRA.Launcher.exe
|
||||||
winlaunch_KIND = winexe
|
winlaunch_KIND = winexe
|
||||||
@@ -108,31 +171,56 @@ winlaunch_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll
|
|||||||
winlaunch_EXTRA = -resource:OpenRA.Launcher.MainForm.resources \
|
winlaunch_EXTRA = -resource:OpenRA.Launcher.MainForm.resources \
|
||||||
-resource:OpenRA.Launcher.InstallPackagesDialog.resources \
|
-resource:OpenRA.Launcher.InstallPackagesDialog.resources \
|
||||||
-resource:OpenRA.Launcher.ConfigureModsDialog.resources
|
-resource:OpenRA.Launcher.ConfigureModsDialog.resources
|
||||||
|
PROGRAMS += winlaunch
|
||||||
|
OpenRA.Launcher.MainForm.resources:
|
||||||
|
resgen2 OpenRA.Launcher/MainForm.resx OpenRA.Launcher.MainForm.resources 1> /dev/null
|
||||||
|
OpenRA.Launcher.InstallPackagesDialog.resources:
|
||||||
|
resgen2 OpenRA.Launcher/InstallPackagesDialog.resx OpenRA.Launcher.InstallPackagesDialog.resources 1> /dev/null
|
||||||
|
OpenRA.Launcher.ConfigureModsDialog.resources:
|
||||||
|
resgen2 OpenRA.Launcher/ConfigureModsDialog.resx OpenRA.Launcher.ConfigureModsDialog.resources 1> /dev/null
|
||||||
|
winlaunch: OpenRA.Launcher.MainForm.resources OpenRA.Launcher.InstallPackagesDialog.resources \
|
||||||
|
OpenRA.Launcher.ConfigureModsDialog.resources $(winlaunch_TARGET)
|
||||||
|
|
||||||
# -platform:x86
|
.PHONY: $(PHONY) $(PROGRAMS)
|
||||||
|
|
||||||
.SUFFIXES:
|
#
|
||||||
.PHONY: clean all game tool default mods mod_ra mod_cnc install uninstall editor_res editor tsbuild ralint seqed filex utility winlaunch
|
# Generate build rules for each target defined above in PROGRAMS
|
||||||
core: game editor
|
#
|
||||||
package: game editor utility
|
define BUILD_ASSEMBLY
|
||||||
all: game tools
|
|
||||||
tools: editor ralint seqed filex tsbuild utility winlaunch
|
|
||||||
game: $(fileformats_TARGET) $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET)
|
|
||||||
|
|
||||||
clean:
|
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS)
|
||||||
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
|
@echo CSC $$(@)
|
||||||
|
@$(CSC) $$($(1)_LIBS:%=-r:%) \
|
||||||
|
-out:$$(@) $(CSFLAGS) $$($(1)_FLAGS) \
|
||||||
|
-define:"$(DEFINE)" \
|
||||||
|
-t:"$$($(1)_KIND)" \
|
||||||
|
$$($(1)_EXTRA) \
|
||||||
|
$$($(1)_SRCS)
|
||||||
|
@test -e fixheader.exe && mono fixheader.exe $$(@) || ``
|
||||||
|
endef
|
||||||
|
|
||||||
distclean: clean
|
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Install / Uninstall for *nix
|
||||||
|
#
|
||||||
|
prefix = /usr/local
|
||||||
|
datarootdir = $(prefix)/share
|
||||||
|
datadir = $(datarootdir)
|
||||||
|
bindir = $(prefix)/bin
|
||||||
|
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
|
||||||
|
INSTALL_DIR = $(DESTDIR)$(datadir)/openra
|
||||||
|
INSTALL = install
|
||||||
|
INSTALL_PROGRAM = $(INSTALL)
|
||||||
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
||||||
|
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
||||||
@$(INSTALL_PROGRAM) $(cnc_TARGET) $(INSTALL_DIR)/mods/cnc
|
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc
|
||||||
@-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
|
@-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
|
||||||
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
|
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
|
||||||
@cp -r mods/cnc/chrome $(INSTALL_DIR)/mods/cnc
|
@cp -r mods/cnc/chrome $(INSTALL_DIR)/mods/cnc
|
||||||
@@ -143,7 +231,7 @@ install: all
|
|||||||
@cp -r mods/cnc/uibits $(INSTALL_DIR)/mods/cnc
|
@cp -r mods/cnc/uibits $(INSTALL_DIR)/mods/cnc
|
||||||
|
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra
|
||||||
@$(INSTALL_PROGRAM) $(ra_TARGET) $(INSTALL_DIR)/mods/ra
|
@$(INSTALL_PROGRAM) $(mod_ra_TARGET) $(INSTALL_DIR)/mods/ra
|
||||||
@-cp $(foreach f,$(shell ls mods/ra --hide=*.dll),mods/ra/$(f)) $(INSTALL_DIR)/mods/ra
|
@-cp $(foreach f,$(shell ls mods/ra --hide=*.dll),mods/ra/$(f)) $(INSTALL_DIR)/mods/ra
|
||||||
@cp -r mods/ra/maps $(INSTALL_DIR)/mods/ra
|
@cp -r mods/ra/maps $(INSTALL_DIR)/mods/ra
|
||||||
@cp -r mods/ra/bits $(INSTALL_DIR)/mods/ra
|
@cp -r mods/ra/bits $(INSTALL_DIR)/mods/ra
|
||||||
@@ -177,52 +265,3 @@ install: all
|
|||||||
uninstall:
|
uninstall:
|
||||||
@-rm -r $(INSTALL_DIR)
|
@-rm -r $(INSTALL_DIR)
|
||||||
@-rm $(DESTDIR)$(bindir)/openra
|
@-rm $(DESTDIR)$(bindir)/openra
|
||||||
|
|
||||||
mod_ra: $(ra_TARGET) $(ralint_TARGET)
|
|
||||||
mono RALint.exe ra
|
|
||||||
mod_cnc: $(cnc_TARGET) $(ralint_TARGET)
|
|
||||||
mono RALint.exe cnc
|
|
||||||
mods: mod_ra mod_cnc
|
|
||||||
|
|
||||||
OpenRA.Editor.MapSelect.resources:
|
|
||||||
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
|
|
||||||
|
|
||||||
OpenRA.Editor.Form1.resources:
|
|
||||||
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
|
|
||||||
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
|
|
||||||
ralint: $(ralint_TARGET)
|
|
||||||
seqed: SequenceEditor.Form1.resources $(seqed_TARGET)
|
|
||||||
SequenceEditor.Form1.resources:
|
|
||||||
resgen2 SequenceEditor/Form1.resx SequenceEditor.Form1.resources 1> /dev/null
|
|
||||||
filex: $(filex_TARGET)
|
|
||||||
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
|
|
||||||
OpenRA.TilesetBuilder.Form1.resources:
|
|
||||||
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
|
|
||||||
|
|
||||||
utility: $(utility_TARGET)
|
|
||||||
winlaunch: OpenRA.Launcher.MainForm.resources OpenRA.Launcher.InstallPackagesDialog.resources \
|
|
||||||
OpenRA.Launcher.ConfigureModsDialog.resources $(winlaunch_TARGET)
|
|
||||||
OpenRA.Launcher.MainForm.resources:
|
|
||||||
resgen2 OpenRA.Launcher/MainForm.resx OpenRA.Launcher.MainForm.resources 1> /dev/null
|
|
||||||
OpenRA.Launcher.InstallPackagesDialog.resources:
|
|
||||||
resgen2 OpenRA.Launcher/InstallPackagesDialog.resx OpenRA.Launcher.InstallPackagesDialog.resources 1> /dev/null
|
|
||||||
OpenRA.Launcher.ConfigureModsDialog.resources:
|
|
||||||
resgen2 OpenRA.Launcher/ConfigureModsDialog.resx OpenRA.Launcher.ConfigureModsDialog.resources 1> /dev/null
|
|
||||||
|
|
||||||
fixheader: packaging/fixheader.cs
|
|
||||||
@$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
|
|
||||||
|
|
||||||
define BUILD_ASSEMBLY
|
|
||||||
|
|
||||||
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS) fixheader
|
|
||||||
@echo CSC $$(@)
|
|
||||||
@$(CSC) $$($(1)_LIBS:%=-r:%) \
|
|
||||||
-out:$$(@) $(CSFLAGS) $$($(1)_FLAGS) \
|
|
||||||
-define:"$(DEFINE)" \
|
|
||||||
-t:"$$($(1)_KIND)" \
|
|
||||||
$$($(1)_EXTRA) \
|
|
||||||
$$($(1)_SRCS)
|
|
||||||
@mono fixheader.exe $$(@)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace fixheader
|
|||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("fixheader {0}", args[0]);
|
||||||
data = File.ReadAllBytes(args[0]);
|
data = File.ReadAllBytes(args[0]);
|
||||||
peOffset = BitConverter.ToInt32(data, 0x3c);
|
peOffset = BitConverter.ToInt32(data, 0x3c);
|
||||||
var corHeaderRva = BitConverter.ToInt32(data, peOffset + 20 + 100 + 14 * 8);
|
var corHeaderRva = BitConverter.ToInt32(data, peOffset + 20 + 100 + 14 * 8);
|
||||||
|
|||||||
Reference in New Issue
Block a user