-
Notifications
You must be signed in to change notification settings - Fork 6
/
BUILD
136 lines (127 loc) · 3.05 KB
/
BUILD
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package(default_visibility = ["//visibility:public"])
load("@mxebzl//tools:rules.bzl", "pkg_winzip")
config_setting(
name = "windows",
values = {
"crosstool_top": "@mxebzl//compiler:win64",
},
)
genrule(
name = "make_version",
outs = ["version.h"],
cmd = """sed -e 's/ / "/g' -e 's/$$/"\\n/g' -e "s/^/#define /g" bazel-out/volatile-status.txt > $@""",
stamp = 1,
)
cc_library(
name = "app",
srcs = [
"app.cc",
],
hdrs = [
"app.h",
"version.h",
],
linkopts = [
"-lSDL2_image",
"-lSDL2_mixer",
"-lSDL2_gfx",
"-lSDL2",
],
deps = [
"//imwidget:base",
"//imwidget:drops",
"//imwidget:editor",
"//imwidget:enemyattr",
"//imwidget:hwpalette",
"//imwidget:misc_hacks",
"//imwidget:map_connect",
"//imwidget:neschrview",
"//imwidget:palace_gfx",
"//imwidget:palette",
"//imwidget:project",
"//imwidget:rom_memory",
"//imwidget:simplemap",
"//imwidget:start_values",
"//imwidget:text_table",
"//imwidget:tile_transform",
"//imwidget:item_effects",
"//imwidget:object_table",
"//imwidget:xptable",
"//nes:cartridge",
"//nes:chr_util",
"//nes:cpu6502",
"//nes:mappers",
"//nes:text_encoding",
"//proto:rominfo",
"//util:browser",
"//util:fpsmgr",
"//util:imgui_sdl_opengl",
"//util:os",
"//util:logging",
"//external:gflags",
# TODO(cfrantz): on ubuntu 16 with MIR, there is a library conflict
# between MIR (linked with protobuf 2.6.1) and this program,
# which builds with protbuf 3.x.x. A temporary workaround is to
# not link with nfd (native-file-dialog).
"//external:nfd",
],
)
filegroup(
name = "content",
srcs = glob(["content/*.textpb"]),
)
genrule(
name = "make_zelda2_config",
srcs = [
"zelda2.textpb",
":content",
],
outs = ["zelda2_config.h"],
cmd = "$(location //tools:pack_config) --config $(location zelda2.textpb)" +
" --symbol kZelda2Cfg > $(@)",
tools = ["//tools:pack_config"],
)
cc_binary(
name = "z2edit",
srcs = [
"main.cc",
"zelda2_config.h",
],
linkopts = select({
":windows": [
"-lpthread",
"-lm",
"-lopengl32",
"-ldinput8",
"-ldxguid",
"-ldxerr8",
"-luser32",
"-lgdi32",
"-lwinmm",
"-limm32",
"-lole32",
"-loleaut32",
"-lshell32",
"-lversion",
"-luuid",
"-lmingw32",
"-lSDL2main",
],
"//conditions:default": [
"-lpthread",
"-lm",
"-lGL",
],
}),
deps = [
":app",
"//external:gflags",
"//util:config",
],
)
pkg_winzip(
name = "z2edit-windows",
files = [
":z2edit",
],
)