Skip to content

Commit e5a39bf

Browse files
committed
Adapt library for Windows
1 parent 553eaa0 commit e5a39bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+90
-10097
lines changed

CMakeLists.txt

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# CMakeLists.txt
3+
# Copyright (C) 2021 Marius Greuel
4+
#
5+
6+
cmake_minimum_required(VERSION 3.12)
7+
project(libelf)
8+
9+
add_library(libelf STATIC
10+
src/32.fsize.c
11+
src/32.getehdr.c
12+
src/32.getphdr.c
13+
src/32.getshdr.c
14+
src/32.newehdr.c
15+
src/32.newphdr.c
16+
src/32.xlatetof.c
17+
src/64.xlatetof.c
18+
src/assert.c
19+
src/begin.c
20+
src/checksum.c
21+
src/cntl.c
22+
src/cook.c
23+
src/data.c
24+
src/end.c
25+
src/errmsg.c
26+
src/errno.c
27+
src/fill.c
28+
src/flag.c
29+
src/gelfehdr.c
30+
src/gelfphdr.c
31+
src/gelfshdr.c
32+
src/gelftrans.c
33+
src/getarhdr.c
34+
src/getaroff.c
35+
src/getarsym.c
36+
src/getbase.c
37+
src/getdata.c
38+
src/getident.c
39+
src/getscn.c
40+
src/hash.c
41+
src/input.c
42+
src/kind.c
43+
src/memset.c
44+
src/ndxscn.c
45+
src/newdata.c
46+
src/newscn.c
47+
src/next.c
48+
src/nextscn.c
49+
src/nlist.c
50+
src/opt.delscn.c
51+
src/rand.c
52+
src/rawdata.c
53+
src/rawfile.c
54+
src/strptr.c
55+
src/swap64.c
56+
src/update.c
57+
src/verdef_32_tof.c
58+
src/verdef_32_tom.c
59+
src/verdef_64_tof.c
60+
src/verdef_64_tom.c
61+
src/version.c
62+
src/x.elfext.c
63+
src/x.movscn.c
64+
src/x.remscn.c
65+
)
66+
67+
target_include_directories(libelf
68+
PUBLIC
69+
include
70+
PRIVATE
71+
src
72+
include/libelf
73+
)
74+
75+
target_compile_definitions(libelf PRIVATE HAVE_CONFIG_H=1)
76+
77+
if(MSVC)
78+
target_compile_definitions(libelf PRIVATE _CRT_SECURE_NO_WARNINGS=1)
79+
target_compile_definitions(libelf PRIVATE _CRT_NONSTDC_NO_WARNINGS=1)
80+
target_compile_options(libelf PRIVATE /wd4244) # warning C4244: '=': conversion from 'xxx' to 'xxx', possible loss of data
81+
target_compile_options(libelf PRIVATE /wd4267) # warning C4267: 'function': conversion from 'xxx' to 'xxx', possible loss of data
82+
target_compile_options(libelf PRIVATE /wd4311) # warning C4311: 'type cast': pointer truncation from 'xxx' to 'xxx'
83+
endif()

INSTALL

-176
This file was deleted.

MANIFEST

-96
This file was deleted.

0 commit comments

Comments
 (0)