1licenses(["notice"]) 2 3exports_files(["LICENSE"]) 4 5INCLUDES = [ 6 ".", 7 "include", 8 "x86", 9 "asm", 10 "disasm", 11 "output", 12] 13 14COPTS = select({ 15 ":windows": [], 16 "//conditions:default": [ 17 "-w", 18 "-DHAVE_CONFIG_H", 19 ], 20}) 21 22cc_library( 23 name = "nasm_2_14_02", 24 srcs = [ 25 "asm/assemble.c", 26 "asm/directbl.c", 27 "asm/directiv.c", 28 "asm/error.c", 29 "asm/eval.c", 30 "asm/exprdump.c", 31 "asm/exprlib.c", 32 "asm/float.c", 33 "asm/labels.c", 34 "asm/listing.c", 35 "asm/parser.c", 36 "asm/pptok.c", 37 "asm/pragma.c", 38 "asm/preproc.c", 39 "asm/preproc-nop.c", 40 "asm/quote.c", 41 "asm/rdstrnum.c", 42 "asm/segalloc.c", 43 "asm/stdscan.c", 44 "asm/strfunc.c", 45 "asm/tokhash.c", 46 "common/common.c", 47 "disasm/disasm.c", 48 "disasm/sync.c", 49 "macros/macros.c", 50 "nasmlib/badenum.c", 51 "nasmlib/bsi.c", 52 "nasmlib/crc64.c", 53 "nasmlib/errfile.c", 54 "nasmlib/file.c", 55 "nasmlib/filename.c", 56 "nasmlib/hashtbl.c", 57 "nasmlib/ilog2.c", 58 "nasmlib/malloc.c", 59 "nasmlib/md5c.c", 60 "nasmlib/mmap.c", 61 "nasmlib/path.c", 62 "nasmlib/perfhash.c", 63 "nasmlib/raa.c", 64 "nasmlib/rbtree.c", 65 "nasmlib/readnum.c", 66 "nasmlib/realpath.c", 67 "nasmlib/saa.c", 68 "nasmlib/srcfile.c", 69 "nasmlib/string.c", 70 "nasmlib/strlist.c", 71 "nasmlib/ver.c", 72 "output/codeview.c", 73 "output/legacy.c", 74 "output/nulldbg.c", 75 "output/nullout.c", 76 "output/outaout.c", 77 "output/outas86.c", 78 "output/outbin.c", 79 "output/outcoff.c", 80 "output/outdbg.c", 81 "output/outelf.c", 82 "output/outform.c", 83 "output/outieee.c", 84 "output/outlib.c", 85 "output/outmacho.c", 86 "output/outobj.c", 87 "output/outrdf2.c", 88 "output/strtbl.c", 89 "stdlib/snprintf.c", 90 "stdlib/strlcpy.c", 91 "stdlib/strnlen.c", 92 "stdlib/strrchrnul.c", 93 "stdlib/vsnprintf.c", 94 "x86/disp8.c", 95 "x86/iflag.c", 96 "x86/insnsa.c", 97 "x86/insnsb.c", 98 "x86/insnsd.c", 99 "x86/insnsn.c", 100 "x86/regdis.c", 101 "x86/regflags.c", 102 "x86/regs.c", 103 "x86/regvals.c", 104 ], 105 hdrs = glob([ 106 "*.h", 107 "include/*.h", 108 "x86/*.h", 109 "disasm/*.h", 110 "config/*.h", 111 "asm/*.h", 112 "output/*.h", 113 "nasmlib/*.h", 114 ]), 115 copts = COPTS, 116 includes = INCLUDES, 117) 118 119cc_binary( 120 name = "nasm", 121 srcs = [ 122 "asm/nasm.c", 123 "nasmlib/zerobuf.c", 124 ], 125 copts = COPTS, 126 includes = INCLUDES, 127 visibility = ["@libjpeg_turbo//:__pkg__"], 128 deps = [ 129 ":nasm_2_14_02", 130 ], 131) 132 133config_setting( 134 name = "windows", 135 values = { 136 "cpu": "x64_windows", 137 }, 138) 139