Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libehp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
libehp
Commits
b9d3f485
Commit
b9d3f485
authored
5 years ago
by
Antonio Flores Montoya
Browse files
Options
Downloads
Patches
Plain Diff
adjust build scripts and add description in README
parent
d073de85
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Collect pointer locations and add a decode instruction method
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+5
-1
5 additions, 1 deletion
CMakeLists.txt
README.md
+20
-1
20 additions, 1 deletion
README.md
src/SConscript
+10
-1
10 additions, 1 deletion
src/SConscript
with
35 additions
and
3 deletions
CMakeLists.txt
+
5
−
1
View file @
b9d3f485
...
@@ -11,12 +11,16 @@ PROJECT(ehp)
...
@@ -11,12 +11,16 @@ PROJECT(ehp)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
option
(
USE_ELFIO
"Use the elfio library to parse elf files"
OFF
)
if
(
USE_ELFIO
)
add_definitions
(
-DUSE_ELFIO
)
endif
()
# Use C++17
# Use C++17
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD 17
)
# Error if it's not available
# Error if it's not available
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
# Base include path for ehp
# Base include path for ehp
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
...
...
This diff is collapsed.
Click to expand it.
README.md
+
20
−
1
View file @
b9d3f485
...
@@ -10,4 +10,23 @@ Notes:
...
@@ -10,4 +10,23 @@ Notes:
1.
Additional documentation will be provided in later versions
1.
Additional documentation will be provided in later versions
1.
API is incomplete and untested in some areas. Future versions will improve stability.
1.
API is incomplete and untested in some areas. Future versions will improve stability.
1.
Use
`git clone --recursive`
to pull down required submodules
1.
Use
`git clone --recursive`
to pull down required submodules
1.
Build with
`scons`
, add
`debug=1`
for debug build
1.
Build with
`scons`
, add
`debug=1`
for debug build, add '--no_elfio' to compile without the third party libraries
## Compilation with cmake
To compile with cmake type:
```
cmake . -Bbuild
cd build
cmake --build .
```
In contrast to scons, the default compilation in cmake is
**without**
the elfio library. If you want to compile with elfio
use the following commands:
```
cmake . -Bbuild -DUSE_ELFIO=ON
cd build
cmake --build .
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/SConscript
+
10
−
1
View file @
b9d3f485
...
@@ -26,11 +26,20 @@ cpppath='''
...
@@ -26,11 +26,20 @@ cpppath='''
'''
'''
cpppath
=
cpppath
+
Dir
(
'
.
'
).
srcnode
().
abspath
+
'
/../third-party/elfio-code
'
cpppath
=
cpppath
+
Dir
(
'
.
'
).
srcnode
().
abspath
+
'
/../third-party/elfio-code
'
AddOption
(
'
--no_elfio
'
,
dest
=
'
no_elfio
'
,
action
=
'
store_true
'
,
default
=
False
,
help
=
'
Do not use Elfio library to parse elf files
'
)
cpp_defines
=
{}
if
(
not
GetOption
(
'
no_elfio
'
)):
cpp_defines
[
'
USE_ELFIO
'
]
=
1
LIBPATH
=
"
$SECURITY_TRANSFORMS_HOME/lib
"
LIBPATH
=
"
$SECURITY_TRANSFORMS_HOME/lib
"
LIBS
=
Split
(
""
)
LIBS
=
Split
(
""
)
myenv
=
myenv
.
Clone
(
CPPPATH
=
Split
(
cpppath
))
myenv
=
myenv
.
Clone
(
CPPPATH
=
Split
(
cpppath
)
,
CPPDEFINES
=
cpp_defines
)
myenv
.
Append
(
CXXFLAGS
=
"
-std=c++11 -Wall -Werror -fmax-errors=2 -fPIC
"
)
myenv
.
Append
(
CXXFLAGS
=
"
-std=c++11 -Wall -Werror -fmax-errors=2 -fPIC
"
)
lib1
=
myenv
.
Library
(
"
ehp
"
,
Split
(
files
),
LIBPATH
=
LIBPATH
,
LIBS
=
LIBS
)
lib1
=
myenv
.
Library
(
"
ehp
"
,
Split
(
files
),
LIBPATH
=
LIBPATH
,
LIBS
=
LIBS
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment