forked from StarWolf3000/vasm-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
60 lines (56 loc) · 1.06 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.5)
project(vasm)
set(VASM_CPU "x86" CACHE STRING "vasm target CPU")
set(VASM_SYNTAX "std" CACHE STRING "vasm assembler syntax")
# vasm
set(vasm_sources
vasm.c
atom.c
expr.c
symtab.c
symbol.c
error.c
parse.c
reloc.c
hugeint.c
cond.c
supp.c
dwarf.c
osdep.c
cpus/${VASM_CPU}/cpu.c
syntax/${VASM_SYNTAX}/syntax.c
output_test.c
output_elf.c
output_bin.c
output_vobj.c
output_hunk.c
output_aout.c
output_tos.c
output_xfile.c
output_srec.c
)
set(vasm_exe vasm${VASM_CPU}_${VASM_SYNTAX})
add_executable(${vasm_exe} ${vasm_sources})
target_include_directories(
${vasm_exe}
PRIVATE
.
cpus/${VASM_CPU}
syntax/${VASM_SYNTAX}
)
if(UNIX)
target_link_libraries(${vasm_exe} m)
endif()
# vobjdump
set(vobjdump_sources
vobjdump.c
)
set(vobjdump_exe vobjdump)
add_executable(${vobjdump_exe} ${vobjdump_sources})
target_include_directories(
${vobjdump_exe}
PRIVATE
.
cpus/${VASM_CPU}
syntax/${VASM_SYNTAX}
)