| licenses(["notice"]) |
| |
| exports_files(["LICENSE"]) |
| |
| INCLUDES = [ |
| ".", |
| "include", |
| "x86", |
| "asm", |
| "disasm", |
| "output", |
| ] |
| |
| COPTS = select({ |
| ":windows": [], |
| "//conditions:default": [ |
| "-w", |
| "-DHAVE_CONFIG_H", |
| ], |
| }) |
| |
| cc_library( |
| name = "nasm_2_14_02", |
| srcs = [ |
| "asm/assemble.c", |
| "asm/directbl.c", |
| "asm/directiv.c", |
| "asm/error.c", |
| "asm/eval.c", |
| "asm/exprdump.c", |
| "asm/exprlib.c", |
| "asm/float.c", |
| "asm/labels.c", |
| "asm/listing.c", |
| "asm/parser.c", |
| "asm/pptok.c", |
| "asm/pragma.c", |
| "asm/preproc.c", |
| "asm/preproc-nop.c", |
| "asm/quote.c", |
| "asm/rdstrnum.c", |
| "asm/segalloc.c", |
| "asm/stdscan.c", |
| "asm/strfunc.c", |
| "asm/tokhash.c", |
| "common/common.c", |
| "disasm/disasm.c", |
| "disasm/sync.c", |
| "macros/macros.c", |
| "nasmlib/badenum.c", |
| "nasmlib/bsi.c", |
| "nasmlib/crc64.c", |
| "nasmlib/errfile.c", |
| "nasmlib/file.c", |
| "nasmlib/filename.c", |
| "nasmlib/hashtbl.c", |
| "nasmlib/ilog2.c", |
| "nasmlib/malloc.c", |
| "nasmlib/md5c.c", |
| "nasmlib/mmap.c", |
| "nasmlib/path.c", |
| "nasmlib/perfhash.c", |
| "nasmlib/raa.c", |
| "nasmlib/rbtree.c", |
| "nasmlib/readnum.c", |
| "nasmlib/realpath.c", |
| "nasmlib/saa.c", |
| "nasmlib/srcfile.c", |
| "nasmlib/string.c", |
| "nasmlib/strlist.c", |
| "nasmlib/ver.c", |
| "output/codeview.c", |
| "output/legacy.c", |
| "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/outform.c", |
| "output/outieee.c", |
| "output/outlib.c", |
| "output/outmacho.c", |
| "output/outobj.c", |
| "output/outrdf2.c", |
| "output/strtbl.c", |
| "stdlib/snprintf.c", |
| "stdlib/strlcpy.c", |
| "stdlib/strnlen.c", |
| "stdlib/strrchrnul.c", |
| "stdlib/vsnprintf.c", |
| "x86/disp8.c", |
| "x86/iflag.c", |
| "x86/insnsa.c", |
| "x86/insnsb.c", |
| "x86/insnsd.c", |
| "x86/insnsn.c", |
| "x86/regdis.c", |
| "x86/regflags.c", |
| "x86/regs.c", |
| "x86/regvals.c", |
| ], |
| hdrs = glob([ |
| "*.h", |
| "include/*.h", |
| "x86/*.h", |
| "disasm/*.h", |
| "config/*.h", |
| "asm/*.h", |
| "output/*.h", |
| "nasmlib/*.h", |
| ]), |
| copts = COPTS, |
| includes = INCLUDES, |
| ) |
| |
| cc_binary( |
| name = "nasm", |
| srcs = [ |
| "asm/nasm.c", |
| "nasmlib/zerobuf.c", |
| ], |
| copts = COPTS, |
| includes = INCLUDES, |
| visibility = ["@libjpeg_turbo//:__pkg__"], |
| deps = [ |
| ":nasm_2_14_02", |
| ], |
| ) |
| |
| config_setting( |
| name = "windows", |
| values = { |
| "cpu": "x64_windows", |
| }, |
| ) |