-
Notifications
You must be signed in to change notification settings - Fork 39
/
monodx.make
96 lines (78 loc) · 4.58 KB
/
monodx.make
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
MONODX_SRCS=$(shell $(SRCDIR)/tools/git-updated-files $(SRCDIR)/monoDX)
define MINGW_TEMPLATE +=
# monodx
$$(BUILDDIR)/monodx-$(1)/.built: $$(MONODX_SRCS) $$(MINGW_DEPS)
mkdir -p $$(@D)
+$$(MINGW_ENV) CFLAGS="$$(PDB_CFLAGS_$(1))" CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $(MAKE) -C $$(@D) -f $$(SRCDIR_ABS)/monoDX/monodx/Makefile ARCH=$(1) SRCDIR="$$(SRCDIR_ABS)/monoDX/monodx" "MINGW=$$(MINGW_$(1))"
touch "$$@"
ifeq (1,$(ENABLE_MONODX))
IMAGEDIR_BUILD_TARGETS += $$(BUILDDIR)/monodx-$(1)/.built
endif
monodx-$(1).dll: $$(BUILDDIR)/monodx-$(1)/.built
mkdir -p "$$(IMAGEDIR)/lib/$(1)"
$$(INSTALL_PE_$(1)) "$$(BUILDDIR)/monodx-$(1)/monodx.dll" "$$(IMAGEDIR)/lib/$(1)/monodx.dll"
.PHONY: monodx-$(1).dll
monodx.dll: monodx-$(1).dll
.PHONY: monodx.dll
ifeq (1,$(ENABLE_MONODX))
imagedir-targets: monodx-$(1).dll
endif
clean-build-monodx-$(1):
rm -rf $$(BUILDDIR)/monodx-$(1)
.PHONY: clean-build-monodx-$(1)
clean-build: clean-build-monodx-$(1)
endef
# monodx
$(SRCDIR)/monoDX/FixupConstructors/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS)
+$(MONO_ENV) $(MAKE) -C $(@D) MONO_CECIL_DLL=$(BUILDDIR_ABS)/mono-unix-install/lib/mono/gac/Mono.Cecil/0.11.1.0__0738eb9f132ed756/Mono.Cecil.dll
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS)
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX.Direct3D/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS) $(SRCDIR)/monoDX/FixupConstructors/.built $(SRCDIR)/monoDX/Microsoft.DirectX/.built
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX.Direct3DX/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS) $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3D/.built
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX.DirectInput/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS) $(SRCDIR)/monoDX/FixupConstructors/.built $(SRCDIR)/monoDX/Microsoft.DirectX/.built
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX.DirectPlay/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS) $(SRCDIR)/monoDX/Microsoft.DirectX/.built
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
$(SRCDIR)/monoDX/Microsoft.DirectX.DirectSound/.built: $(BUILDDIR)/mono-unix/.installed $(MONODX_SRCS) $(SRCDIR)/monoDX/Microsoft.DirectX/.built $(SRCDIR)/monoDX/FixupConstructors/.built
+$(MONO_ENV) $(MAKE) -C $(@D)
touch $@
ifeq (1,$(ENABLE_MONODX))
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX/.built
Microsoft.DirectX.dll: $(SRCDIR)/monoDX/Microsoft.DirectX/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX/Microsoft.DirectX.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.dll
imagedir-targets: Microsoft.DirectX.dll
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3D/.built
Microsoft.DirectX.Direct3D.dll: $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3D/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3D/Microsoft.DirectX.Direct3D.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.Direct3D.dll
imagedir-targets: Microsoft.DirectX.Direct3D.dll
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3DX/.built
Microsoft.DirectX.Direct3DX.dll: $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3DX/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX.Direct3DX/Microsoft.DirectX.Direct3DX.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.Direct3DX.dll
imagedir-targets: Microsoft.DirectX.Direct3DX.dll
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX.DirectInput/.built
Microsoft.DirectX.DirectInput.dll: $(SRCDIR)/monoDX/Microsoft.DirectX.DirectInput/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX.DirectInput/Microsoft.DirectX.DirectInput.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.DirectInput.dll
imagedir-targets: Microsoft.DirectX.DirectInput.dll
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX.DirectPlay/.built
Microsoft.DirectX.DirectPlay.dll: $(SRCDIR)/monoDX/Microsoft.DirectX.DirectPlay/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX.DirectPlay/Microsoft.DirectX.DirectPlay.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.DirectPlay.dll
imagedir-targets: Microsoft.DirectX.DirectPlay.dll
IMAGEDIR_BUILD_TARGETS += $(SRCDIR)/monoDX/Microsoft.DirectX.DirectSound/.built
Microsoft.DirectX.DirectSound.dll: $(SRCDIR)/monoDX/Microsoft.DirectX.DirectSound/.built
$(MONO_ENV) gacutil -i $(SRCDIR)/monoDX/Microsoft.DirectX.DirectSound/Microsoft.DirectX.DirectSound.dll -root $(IMAGEDIR)/lib
.PHONY: Microsoft.DirectX.DirectSound.dll
imagedir-targets: Microsoft.DirectX.DirectSound.dll
endif