Skip to content

Commit

Permalink
cleaning makefile & cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Apr 19, 2020
1 parent 8ea0f19 commit 5f43859
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 25 deletions.
6 changes: 2 additions & 4 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ set (TARGET_SOURCES
../common/generator.c
deps/cliparser/argtable3.c
deps/cliparser/cliparser.c
deps/hardnested/hardnested_bruteforce.c
src/crypto/asn1dump.c
src/crypto/asn1utils.c
src/crypto/libpcrypto.c
Expand Down Expand Up @@ -246,7 +245,7 @@ target_include_directories(proxmark3 PRIVATE
..
../common
../include
deps
deps/cliparser
src
src/uart
)
Expand All @@ -265,8 +264,7 @@ find_library(reveng REQUIRED)
find_library(z REQUIRED)
find_library(hardnested REQUIRED)

target_include_directories(proxmark3 PUBLIC mbedtls jansson lua tinycbor amiibo reveng z hardnested)
target_link_libraries(proxmark3 readline pthread m mbedtls jansson lua tinycbor amiibo reveng z hardnested ${ADDITIONAL_LNK})
target_link_libraries(proxmark3 PRIVATE readline pthread m mbedtls jansson lua tinycbor amiibo reveng z hardnested ${ADDITIONAL_LNK})

install(TARGETS proxmark3 DESTINATION "bin")
install(DIRECTORY cmdscripts lualibs luascripts resources dictionaries DESTINATION "share/proxmark3")
Expand Down
10 changes: 5 additions & 5 deletions client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include ../Makefile.defs
INSTALLBIN = proxmark3
INSTALLSHARE = cmdscripts lualibs luascripts resources dictionaries

VPATH = ../common src/uart src deps
VPATH = ../common src/uart src
vpath %.dic dictionaries
OBJDIR = obj

Expand Down Expand Up @@ -52,7 +52,7 @@ ZLIBPATH = ../common/zlib
ZLIB = $(OBJDIR)/libz.a

LIBS = -I$(LUALIBPATH) -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH) -I$(ZLIBPATH) -I$(REVENGPATH) -I$(AMIIBOLIBPATH) -I$(HARDNESTEDPATH)
INCLUDES_CLIENT = -I./src -I./deps -I../include -I../common -I./deps/cliparser -I./src/uart $(LIBS)
INCLUDES_CLIENT = -I./src -I../include -I../common -I./deps/cliparser -I./src/uart $(LIBS)
CFLAGS ?= -Wall -Werror -O3
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
PM3CFLAGS = $(CFLAGS) -std=c99 -D_ISOC99_SOURCE $(INCLUDES_CLIENT)
Expand All @@ -63,7 +63,7 @@ ifneq (,$(findstring MINGW,$(platform)))
PM3CFLAGS += -mno-ms-bitfields -fexec-charset=cp850
endif
CXXFLAGS ?= -Wall -Werror -O3
PM3CXXFLAGS = $(CXXFLAGS) -I../include -I/.deps/cliparser
PM3CXXFLAGS = $(CXXFLAGS) -I../include

LUAPLATFORM = generic
ifneq (,$(findstring MINGW,$(platform)))
Expand Down Expand Up @@ -150,8 +150,8 @@ CMDSRCS = crapto1/crapto1.c \
crypto/asn1dump.c \
crypto/libpcrypto.c\
crypto/asn1utils.c\
cliparser/argtable3.c\
cliparser/cliparser.c\
deps/cliparser/argtable3.c\
deps/cliparser/cliparser.c\
loclass/cipher.c \
loclass/cipherutils.c \
loclass/ikeys.c \
Expand Down
1 change: 1 addition & 0 deletions client/deps/hardnested.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ target_include_directories(hardnested PRIVATE
../../include
../src
jansson)
target_include_directories(hardnested INTERFACE hardnested)
1 change: 1 addition & 0 deletions client/deps/reveng.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ add_library(reveng STATIC

target_compile_definitions(reveng PRIVATE PRESETS)
target_include_directories(reveng PRIVATE .)
target_include_directories(reveng INTERFACE reveng)
target_compile_options(reveng PRIVATE -Wall -Werror -O3)
2 changes: 1 addition & 1 deletion client/src/cmdcrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# endif /* STDIN_FILENO */
#endif /* _WIN32 */

#include "reveng/reveng.h"
#include "reveng.h"
#include "ui.h"
#include "util.h"

Expand Down
2 changes: 1 addition & 1 deletion client/src/cmddata.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "cmdlfem4x.h" // askem410xdecode
#include "fileutils.h" // searchFile
#include "mifare/ndef.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"

uint8_t DemodBuffer[MAX_DEMOD_BUF_LEN];
size_t DemodBufferLen = 0;
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhf.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <ctype.h> // tolower

#include "cmdparser.h" // command_t
#include "cliparser/cliparser.h" // parse
#include "cliparser.h" // parse
#include "comms.h" // clearCommandBuffer
#include "lfdemod.h" // computeSignalProperties
#include "cmdhf14a.h" // ISO14443-A
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhf14a.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "commonutil.h" // ARRAYLEN
#include "comms.h" // clearCommandBuffer
#include "cmdtrace.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "cmdhfmf.h"
#include "cmdhfmfu.h"
#include "emv/emvcore.h"
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhffido.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "proxmark3.h"
#include "emv/emvcore.h"
#include "emv/emvjson.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "../crypto/asn1utils.h"
#include "../crypto/libpcrypto.h"
#include "fido/cbortools.h"
Expand Down
4 changes: 2 additions & 2 deletions client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "cmdtrace.h"
#include "emv/dump.h"
#include "mifare/mifaredefault.h" // mifare default key array
#include "cliparser/cliparser.h" // argtable
#include "hardnested/hardnested_bf_core.h" // SetSIMDInstr
#include "cliparser.h" // argtable
#include "hardnested_bf_core.h" // SetSIMDInstr
#include "mifare/mad.h"
#include "mifare/ndef.h"
#include "protocols.h"
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhfmfdes.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "protocols.h"
#include "mifare.h" // desfire raw command options
#include "cmdtrace.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "emv/apduinfo.h" // APDU manipulation / errorcodes
#include "emv/emvcore.h" // APDU logging
#include "util_posix.h" // msleep
Expand Down
6 changes: 3 additions & 3 deletions client/src/cmdhfmfhard.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#include "util_posix.h"
#include "crapto1/crapto1.h"
#include "parity.h"
#include "hardnested/hardnested_bruteforce.h"
#include "hardnested/hardnested_bf_core.h"
#include "hardnested/hardnested_bitarray_core.h"
#include "hardnested_bruteforce.h"
#include "hardnested_bf_core.h"
#include "hardnested_bitarray_core.h"
#include "zlib.h"
#include "fileutils.h"

Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhfmfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "mifare/mifare4.h"
#include "mifare/mad.h"
#include "mifare/ndef.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "emv/dump.h"
#include "mifare/mifaredefault.h"
#include "util_posix.h"
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhfmfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "protocols.h"
#include "generator.h"
#include "mifare/ndef.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"


#define MAX_UL_BLOCKS 0x0F
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdlfindala.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "cmdparser.h" // command_t
#include "comms.h"
#include "graph.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "commonutil.h"
#include "ui.h" // PrintAndLog
#include "lfdemod.h" // parityTest, bitbytes_to_byte
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdlfmotorola.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "protocols.h" // t55xx defines
#include "cmdlft55xx.h" // clone..
#include "cmdlf.h" // cmdlfconfig
#include "cliparser/cliparser.h" // cli parse input
#include "cliparser.h" // cli parse input


static int CmdHelp(const char *Cmd);
Expand Down
2 changes: 1 addition & 1 deletion client/src/emv/cmdemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "cmdtrace.h"
#include "emvjson.h"
#include "test/cryptotest.h"
#include "cliparser/cliparser.h"
#include "cliparser.h"
#include "cmdparser.h"
#include "proxmark3.h"
#include "emv_roca.h"
Expand Down

0 comments on commit 5f43859

Please sign in to comment.