summaryrefslogtreecommitdiff
path: root/pkg/nasm/gen.lua
blob: 96994eb6e1773dee998d2e4f1b54e2187c979ab7 (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
cflags{
	'-D HAVE_CONFIG_H',
	'-I $dir',
	'-I $srcdir',
	'-I $srcdir/include',
	'-I $srcdir/x86',
	'-I $srcdir/asm',
	'-I $srcdir/disasm',
	'-I $srcdir/output',
}

lib('libnasm.a', [[
	stdlib/(snprintf.c vsnprintf.c strlcpy.c strnlen.c strrchrnul.c)
	nasmlib/(
		ver.c
		crc64.c malloc.c errfile.c
		md5c.c string.c
		file.c mmap.c ilog2.c
		realpath.c path.c
		filename.c srcfile.c
		zerobuf.c readnum.c bsi.c
		rbtree.c hashtbl.c
		raa.c saa.c
		strlist.c
		perfhash.c badenum.c
	)
	common/common.c
	x86/(
		insnsa.c insnsb.c insnsd.c insnsn.c
		regs.c regvals.c regflags.c regdis.c
		disp8.c iflag.c
	)
	asm/(
		error.c
		float.c
		directiv.c directbl.c
		pragma.c
		assemble.c labels.c parser.c
		preproc.c quote.c pptok.c
		listing.c eval.c exprlib.c exprdump.c
		stdscan.c
		strfunc.c tokhash.c
		segalloc.c
		preproc-nop.c
		rdstrnum.c
	)
	macros/macros.c
	output/(
		outform.c outlib.c legacy.c
		strtbl.c
		nulldbg.c nullout.c
		outbin.c outaout.c outcoff.c
		outelf.c
		outobj.c outas86.c outrdf2.c
		outdbg.c outieee.c outmacho.c
		codeview.c
	)
	disasm/(disasm.c sync.c)
]])

exe('nasm', {'asm/nasm.c', 'libnasm.a'})
file('bin/nasm', '755', '$outdir/nasm')
man{'nasm.1'}

fetch 'curl'