mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
remove c99 and c++11 restrictions
This commit is contained in:
parent
8b5fd56bc3
commit
fbe4e20326
20 changed files with 28 additions and 30 deletions
|
@ -12,8 +12,6 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0")
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
|
|
||||||
if(APPLE AND EXISTS /usr/local/opt/qt5)
|
if(APPLE AND EXISTS /usr/local/opt/qt5)
|
||||||
# Homebrew installs Qt5 (up to at least 5.11.0) in
|
# Homebrew installs Qt5 (up to at least 5.11.0) in
|
||||||
# /usr/local/qt5. Ensure that it can be found by CMake
|
# /usr/local/qt5. Ensure that it can be found by CMake
|
||||||
|
|
|
@ -57,7 +57,7 @@ LIBS = -I$(LUALIBPATH) -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH)
|
||||||
INCLUDES_CLIENT = -I./src -I../include -I../common -I../common_fpga $(LIBS)
|
INCLUDES_CLIENT = -I./src -I../include -I../common -I../common_fpga $(LIBS)
|
||||||
CFLAGS ?= -Wall -Werror -O3
|
CFLAGS ?= -Wall -Werror -O3
|
||||||
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
|
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
|
||||||
PM3CFLAGS = $(CFLAGS) -std=c99 $(INCLUDES_CLIENT)
|
PM3CFLAGS = $(CFLAGS) $(INCLUDES_CLIENT)
|
||||||
# WIP Testing
|
# WIP Testing
|
||||||
#PM3CFLAGS = $(CFLAGS) -std=c11 -pedantic $(INCLUDES_CLIENT)
|
#PM3CFLAGS = $(CFLAGS) -std=c11 -pedantic $(INCLUDES_CLIENT)
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
@ -101,7 +101,7 @@ ifneq ($(SKIPQT),1)
|
||||||
MOC = $(shell pkg-config --variable=moc_location QtCore)
|
MOC = $(shell pkg-config --variable=moc_location QtCore)
|
||||||
UIC = $(shell pkg-config --variable=uic_location QtCore)
|
UIC = $(shell pkg-config --variable=uic_location QtCore)
|
||||||
else
|
else
|
||||||
PM3CXXFLAGS += -std=c++11 -fPIC
|
PM3CXXFLAGS += -fPIC
|
||||||
endif
|
endif
|
||||||
ifeq ($(QTINCLUDES), )
|
ifeq ($(QTINCLUDES), )
|
||||||
# if both pkg-config commands failed, search in common places
|
# if both pkg-config commands failed, search in common places
|
||||||
|
@ -111,7 +111,7 @@ ifneq ($(SKIPQT),1)
|
||||||
ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
|
ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
|
||||||
QTINCLUDES += -I$(QTDIR)/include/QtWidgets
|
QTINCLUDES += -I$(QTDIR)/include/QtWidgets
|
||||||
QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core
|
QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core
|
||||||
PM3CXXFLAGS += -std=c++11 -fPIC
|
PM3CXXFLAGS += -fPIC
|
||||||
endif
|
endif
|
||||||
MOC = $(QTDIR)/bin/moc
|
MOC = $(QTDIR)/bin/moc
|
||||||
UIC = $(QTDIR)/bin/uic
|
UIC = $(QTDIR)/bin/uic
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#amiitool.c $(MYSRCS) ../../../../common/../../commonutil.c ../ui.c -lreadline -lm ../../../../common/mbedtls/libmbedtls.a \
|
#amiitool.c $(MYSRCS) ../../../../common/../../commonutil.c ../ui.c -lreadline -lm ../../../../common/mbedtls/libmbedtls.a \
|
||||||
#-o amiitool
|
#-o amiitool
|
||||||
|
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(amiibo STATIC
|
add_library(amiibo STATIC
|
||||||
amiitool/amiibo.c
|
amiitool/amiibo.c
|
||||||
amiitool/drbg.c
|
amiitool/drbg.c
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I. -I.. -I../jansson -I../../../common -I../../../include
|
MYINCLUDES = -I. -I.. -I../jansson -I../../../common -I../../../include
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
amiibo.c \
|
amiibo.c \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I../../../common -I../../../include -I../../src
|
MYINCLUDES = -I../../../common -I../../../include -I../../src
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
argtable3.c \
|
argtable3.c \
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(hardnested_nosimd OBJECT
|
add_library(hardnested_nosimd OBJECT
|
||||||
hardnested/hardnested_bf_core.c
|
hardnested/hardnested_bf_core.c
|
||||||
hardnested/hardnested_bitarray_core.c)
|
hardnested/hardnested_bitarray_core.c)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../jansson
|
MYINCLUDES = -I../../../common -I../../../include -I../../src -I../jansson
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
MYSRCS = hardnested_bruteforce.c
|
MYSRCS = hardnested_bruteforce.c
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// To compile it:
|
// To compile it:
|
||||||
// gcc -std=c99 -I ../../common -o hardnested_tables hardnested_tables.c
|
// gcc -I../../../common -I../../../include -o hardnested_tables hardnested_tables.c
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(jansson STATIC
|
add_library(jansson STATIC
|
||||||
jansson/dump.c
|
jansson/dump.c
|
||||||
jansson/error.c
|
jansson/error.c
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I.
|
MYINCLUDES = -I.
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE -Wno-unused-function
|
MYCFLAGS = -Wno-unused-function
|
||||||
MYDEFS = -DHAVE_STDINT_H
|
MYDEFS = -DHAVE_STDINT_H
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
dump.c \
|
dump.c \
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I.
|
MYINCLUDES = -I.
|
||||||
# Lua lib is not ready for C99 style...
|
# Lua lib requires GNU extensions (implicit declarations of functions): -std=gnu99 or -std=gnu11
|
||||||
#MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
|
||||||
MYCFLAGS =
|
MYCFLAGS =
|
||||||
MYDEFS = -DLUA_COMPAT_ALL $(SYSCFLAGS)
|
MYDEFS = -DLUA_COMPAT_ALL $(SYSCFLAGS)
|
||||||
MYSRCS = lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
|
MYSRCS = lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(mbedtls STATIC
|
add_library(mbedtls STATIC
|
||||||
../../common/mbedtls/aes.c
|
../../common/mbedtls/aes.c
|
||||||
../../common/mbedtls/asn1parse.c
|
../../common/mbedtls/asn1parse.c
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(reveng STATIC
|
add_library(reveng STATIC
|
||||||
reveng/bmpbit.c
|
reveng/bmpbit.c
|
||||||
reveng/cli.c
|
reveng/cli.c
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I../cliparser
|
MYINCLUDES = -I../cliparser
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS = -DPRESETS
|
MYDEFS = -DPRESETS
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
bmpbit.c \
|
bmpbit.c \
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES =
|
MYINCLUDES =
|
||||||
# Strange errors on Mingw when compiling with C99
|
# Strange errors on Mingw when compiling with C99
|
||||||
#MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
|
||||||
MYCFLAGS =
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
set_property(SOURCE PROPERTY C_STANDARD 99)
|
|
||||||
|
|
||||||
add_library(z STATIC
|
add_library(z STATIC
|
||||||
../../common/zlib/deflate.c
|
../../common/zlib/deflate.c
|
||||||
../../common/zlib/adler32.c
|
../../common/zlib/adler32.c
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I. -I..
|
MYINCLUDES = -I. -I..
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
aes.c \
|
aes.c \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
MYSRCPATHS = ../../common/zlib
|
MYSRCPATHS = ../../common/zlib
|
||||||
MYSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c
|
MYSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c
|
||||||
MYINCLUDES = -I../../common/zlib
|
MYINCLUDES = -I../../common/zlib
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS = -DZ_SOLO -DNO_GZIP -DZLIB_PM3_TUNED
|
MYDEFS = -DZ_SOLO -DNO_GZIP -DZLIB_PM3_TUNED
|
||||||
#-DDEBUG -Dverbose=1
|
#-DDEBUG -Dverbose=1
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
MYSRCPATHS = ../../common ../../common/crapto1
|
MYSRCPATHS = ../../common ../../common/crapto1
|
||||||
MYSRCS = crypto1.c crapto1.c bucketsort.c
|
MYSRCS = crypto1.c crapto1.c bucketsort.c
|
||||||
MYINCLUDES = -I../../include -I../../common
|
MYINCLUDES = -I../../include -I../../common
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
|
|
||||||
BINS = mfkey32 mfkey32v2 mfkey64
|
BINS = mfkey32 mfkey32v2 mfkey64
|
||||||
|
@ -9,6 +9,13 @@ INSTALLTOOLS = $(BINS)
|
||||||
|
|
||||||
include ../../Makefile.host
|
include ../../Makefile.host
|
||||||
|
|
||||||
|
# checking platform can be done only after Makefile.host
|
||||||
|
ifneq (,$(findstring MINGW,$(platform)))
|
||||||
|
# Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
|
||||||
|
# and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
|
||||||
|
CFLAGS += -D_ISOC99_SOURCE
|
||||||
|
endif
|
||||||
|
|
||||||
mfkey32 : $(OBJDIR)/mfkey32.o $(MYOBJS)
|
mfkey32 : $(OBJDIR)/mfkey32.o $(MYOBJS)
|
||||||
mfkey32v2 : $(OBJDIR)/mfkey32v2.o $(MYOBJS)
|
mfkey32v2 : $(OBJDIR)/mfkey32v2.o $(MYOBJS)
|
||||||
mfkey64 : $(OBJDIR)/mfkey64.o $(MYOBJS)
|
mfkey64 : $(OBJDIR)/mfkey64.o $(MYOBJS)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
MYSRCPATHS = ../../common ../../common/crapto1
|
MYSRCPATHS = ../../common ../../common/crapto1
|
||||||
MYSRCS = crypto1.c crapto1.c bucketsort.c
|
MYSRCS = crypto1.c crapto1.c bucketsort.c
|
||||||
MYINCLUDES = -I../../include -I../../common
|
MYINCLUDES = -I../../include -I../../common
|
||||||
MYCFLAGS = -std=c99 -D_ISOC99_SOURCE
|
MYCFLAGS =
|
||||||
MYDEFS =
|
MYDEFS =
|
||||||
|
|
||||||
BINS = nonce2key
|
BINS = nonce2key
|
||||||
|
@ -9,4 +9,11 @@ INSTALLTOOLS = $(BINS)
|
||||||
|
|
||||||
include ../../Makefile.host
|
include ../../Makefile.host
|
||||||
|
|
||||||
|
# checking platform can be done only after Makefile.host
|
||||||
|
ifneq (,$(findstring MINGW,$(platform)))
|
||||||
|
# Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
|
||||||
|
# and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
|
||||||
|
CFLAGS += -D_ISOC99_SOURCE
|
||||||
|
endif
|
||||||
|
|
||||||
nonce2key : $(OBJDIR)/nonce2key.o $(MYOBJS)
|
nonce2key : $(OBJDIR)/nonce2key.o $(MYOBJS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue