Skip to content

Commit

Permalink
Merge pull request #3 from mentebinaria/code-clean-up
Browse files Browse the repository at this point in the history
Code clean up
  • Loading branch information
rem0obb authored Dec 28, 2021
2 parents 9e7d081 + 629a19e commit 7aa91bb
Show file tree
Hide file tree
Showing 21 changed files with 382 additions and 360 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.0)

# Options
option(test "Build all tests." ON)
option(debug "Build with debug flags." ON)
option(qt "Build with QT GUI." ON)
option(test "Build all tests." OFF)
option(debug "Build with debug flags." OFF)
option(qt "Build with QT GUI." OFF)
option(windows "Enabled windows build." OFF)

#define project
Expand All @@ -26,10 +26,10 @@ set(PROJECT_DOMAIN "${PROJECT_DOMAIN_FIRST}.${PROJECT_DOMAIN_SECOND}")

# compiler flags
if (debug)
set(CMAKE_CXX_FLAGS "-g -Wall -Werror")
set(CMAKE_CXX_FLAGS "-g -Wall -Werror -fno-stack-protector -march=native")
else()
if (APPLE)
set(CMAKE_CXX_FLAGS "-O2 -Wall -Werror")
set(CMAKE_CXX_FLAGS "-O2 -Wall -Werror -fno-stack-protector -march=native")
else()
if(windows)
if (tests)
Expand All @@ -38,7 +38,7 @@ else()
set(CMAKE_CXX_FLAGS "-O2 /EHsc")
endif()
else()
set(CMAKE_CXX_FLAGS "-O2 -Werror -Wall")
set(CMAKE_CXX_FLAGS "-O2 -Werror -Wall -fno-stack-protector -march=native")
endif()
endif()
endif()
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ELF Parser
Multiplatform CLI and GUI tool to show information about ELF files
This project is a tentative to keep [elfparser](https://github.com/mentebinaria/elfparser-ng) alive. Plans include update it and add new features.
This project is a tentative to keep [elfparser](https://github.com/jacob-baines/elfparser) alive. Plans include update it and add new features.

> [License](LICENSE)
Expand All @@ -16,7 +16,8 @@ ELF Parser can be compiled on Windows, OS X, or Linux (demangling and unit tests


>To compile windows, just go to [CMakeFiles](CMakeLists.txt), change `windows` to `on`
![Windows](assets/compiler_windows.png) Open Visual Studio 2019 command `ctrl+f5`
![Windows](assets/compiler_windows.png) install `cmake` create archive `build` enter archive
execute command `cmake ..`, Open Visual Studio 2019 command `ctrl+f5`

## Compile Targets
ELF Parser has a number of compilation targets that can be configured by CMakeLists.txt. The targets are:
Expand All @@ -28,7 +29,8 @@ ELF Parser has a number of compilation targets that can be configured by CMakeLi

[boost C++](http://robots.uc3m.es/installation-guides/install-boost.html#install-boost-windows)
```
sudo apt-get install boost
sudo apt-get install libboost-all-dev
```

[Qt5](https://www.qt.io/download-open-source)
Expand Down
4 changes: 2 additions & 2 deletions lib/hash-lib/md5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// see http://create.stephan-brumme.com/disclaimer.html
//

#include "md5.h"
#include "md5.hpp"

#ifndef _MSC_VER
#include "../../src/endian.h"
#include "../../src/endian.hpp"
#endif


Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/hash-lib/sha1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// see http://create.stephan-brumme.com/disclaimer.html
//

#include "sha1.h"
#include "sha1.hpp"

// big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
#ifndef _MSC_VER
#include "../../src/endian.h"
#include "../../src/endian.hpp"
#endif


Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/hash-lib/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// see http://create.stephan-brumme.com/disclaimer.html
//

#include "sha256.h"
#include "sha256.hpp"

// big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
#ifndef _MSC_VER
#include "../../src/endian.h"
#include "../../src/endian.hpp"
#endif


Expand Down
File renamed without changes.
Loading

0 comments on commit 7aa91bb

Please sign in to comment.