summaryrefslogtreecommitdiff
path: root/pkg/mgba/gen.lua
blob: e100937e8011ef9f963199d9cad830f2c32b6622 (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
131
132
133
134
135
136
137
138
139
cflags{
	'-std=c11', '-Wpedantic', '-Wno-overflow', '-Wno-discarded-qualifiers',
	'-D _DEFAULT_SOURCE',
	'-include $dir/config.h',
	'-I $srcdir/include',
	'-I $srcdir/src',
}

build('sed', '$outdir/version.c', '$srcdir/src/core/version.c.in', {
	expr={
		[[-e '/$${GIT_COMMIT}/d']],
		[[-e '/$${GIT_COMMIT_SHORT}/d']],
		[[-e '/$${GIT_BRANCH}/d']],
		[[-e '/$${GIT_REV}/d']],
		[[-e 's,$${BINARY_NAME},mgba,']],
		[[-e 's,$${PROJECT_NAME},mGBA,']],
		[[-e 's,$${VERSION_STRING},0.8.4,']],
	}
})

lib('mgba_libretro.a', [[
	src/(
		platform/(
			libretro/libretro.c
			posix/memory.c
		)
		core/(
			bitmap-cache.c
			cache-set.c
			cheats.c
			config.c
			core.c
			directories.c
			input.c
			interface.c
			library.c
			lockstep.c
			log.c
			map-cache.c
			mem-search.c
			rewind.c
			scripting.c
			serialize.c
			sync.c
			thread.c
			tile-cache.c
			timing.c
		)
		util/(
			circle-buffer.c
			configuration.c
			crc32.c
			elf-read.c
			export.c
			formatting.c
			gbk-table.c
			hash.c
			patch.c
			patch-fast.c
			patch-ips.c
			patch-ups.c
			png-io.c
			ring-fifo.c
			string.c
			table.c
			text-codec.c
			vfs.c
			vfs/(vfs-mem.c vfs-fifo.c vfs-fd.c vfs-dirent.c)
		)
		gb/(
			audio.c
			cheats.c
			core.c
			gb.c
			io.c
			mbc.c
			memory.c
			overrides.c
			serialize.c
			renderers/cache-set.c
			renderers/software.c
			sio.c
			timer.c
			video.c
		)
		sm83/(
			decoder.c
			isa-sm83.c
			sm83.c
		)
		gba/(
			audio.c
			bios.c
			cheats.c
			cheats/codebreaker.c
			cheats/gameshark.c
			cheats/parv3.c
			core.c
			dma.c
			gba.c
			hardware.c
			hle-bios.c
			input.c
			io.c
			matrix.c
			memory.c
			overrides.c
			renderers/cache-set.c
			renderers/common.c
			renderers/gl.c
			renderers/software-bg.c
			renderers/software-mode0.c
			renderers/software-obj.c
			renderers/video-software.c
			savedata.c
			serialize.c
			sharkport.c
			sio.c
			timer.c
			vfame.c
			video.c
		)
		arm/(
			arm.c
			decoder-arm.c
			decoder.c
			decoder-thumb.c
			isa-arm.c
			isa-thumb.c
		)
		third-party/(
			blip_buf/blip_buf.c
			inih/ini.c
		)
	)
	$outdir/version.c
]])

fetch 'git'