forked from shinh/maloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (42 loc) · 957 Bytes
/
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
project(Maloader)
cmake_minimum_required(VERSION 2.8)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
#FIXME find out how to be able to compile for 32bit on 64bit
set(CMAKE_C_FLAGS "-Wall -Werror")
set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -Wall -Werror")
set(CMAKE_C_FLAGS_RELEASE "-O0 -ggdb -Wall -Werror")
set(CMAKE_CXX_FLAGS "-ggdb -Wall -Werror")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -Wall -Werror")
set(CMAKE_CXX_FLAGS_RELEASE "-O0 -ggdb -Wall -Werror")
include_directories(.)
include_directories(include)
add_executable(
ld-mac
log.cc
ld-mac.cc
mach-o.cc
fat.h
fat.cc
include/mach/machine.h
)
add_subdirectory(libmac)
target_link_libraries(
ld-mac
dl
)
add_executable(
extract
extract.cc
fat.cc
)
add_executable(
macho2elf
macho2elf.cc
mach-o.cc
fat.cc
log.cc
)