aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/nasm.BUILD
blob: 341d58068be48b1edbbc28718cc104a467efa8d0 (plain)
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
# Description:
#   NASM is a portable assembler in the Intel/Microsoft tradition.

licenses(["notice"])  # BSD 2-clause

exports_files(["LICENSE"])

cc_binary(
    name = "nasm",
    srcs = [
        "assemble.c",
        "assemble.h",
        "compiler.h",
        "crc64.c",
        "directiv.c",
        "directiv.h",
        "disp8.c",
        "disp8.h",
        "eval.c",
        "eval.h",
        "exprlib.c",
        "float.c",
        "float.h",
        "hashtbl.c",
        "hashtbl.h",
        "iflag.c",
        "iflag.h",
        "iflaggen.h",
        "ilog2.c",
        "insns.h",
        "insnsa.c",
        "insnsb.c",
        "insnsi.h",
        "labels.c",
        "labels.h",
        "lib/strlcpy.c",
        "listing.c",
        "listing.h",
        "macros.c",
        "md5.h",
        "md5c.c",
        "nasm.c",
        "nasm.h",
        "nasmlib.c",
        "nasmlib.h",
        "opflags.h",
        "output/codeview.c",
        "output/dwarf.h",
        "output/elf.h",
        "output/nulldbg.c",
        "output/nullout.c",
        "output/outaout.c",
        "output/outas86.c",
        "output/outbin.c",
        "output/outcoff.c",
        "output/outdbg.c",
        "output/outelf.c",
        "output/outelf.h",
        "output/outelf32.c",
        "output/outelf64.c",
        "output/outelfx32.c",
        "output/outform.c",
        "output/outform.h",
        "output/outieee.c",
        "output/outlib.c",
        "output/outlib.h",
        "output/outmacho.c",
        "output/outobj.c",
        "output/outrdf2.c",
        "output/pecoff.h",
        "output/stabs.h",
        "parser.c",
        "parser.h",
        "pptok.c",
        "pptok.h",
        "preproc.c",
        "preproc.h",
        "preproc-nop.c",
        "quote.c",
        "quote.h",
        "raa.c",
        "raa.h",
        "rbtree.c",
        "rbtree.h",
        "rdoff/rdoff.h",
        "realpath.c",
        "regflags.c",
        "regs.h",
        "regvals.c",
        "saa.c",
        "saa.h",
        "srcfile.c",
        "stdscan.c",
        "stdscan.h",
        "strfunc.c",
        "tables.h",
        "tokens.h",
        "tokhash.c",
        "ver.c",
        "version.h",
    ],
    copts = select({
        ":windows": [],
        ":windows_msvc": [],
        "//conditions:default": [
            "-w",
            "-std=c99",
        ],
    }),
    defines = select({
        ":windows": [],
        ":windows_msvc": [],
        "//conditions:default": ["HAVE_SNPRINTF"],
    }),
    visibility = ["@jpeg//:__pkg__"],
)

config_setting(
    name = "windows_msvc",
    values = {
        "cpu": "x64_windows_msvc",
    },
)

config_setting(
    name = "windows",
    values = {
        "cpu": "x64_windows",
    },
)