proxmark3/Makefile.defs

62 lines
1.6 KiB
Text
Raw Normal View History

2019-08-31 04:10:06 +08:00
# Hide full compilation line:
ifneq ($(V),1)
Q?=@
endif
# To see full command lines, use make V=1
# been here
DEFSBEENHERE = true
CP = cp -a
GZIP = gzip
MKDIR = mkdir -p
RM = rm -f
RMDIR = rm -rf
2019-08-31 04:29:01 +08:00
# rmdir only if dir is empty, tolerate failure
RMDIR_SOFT = -rmdir
2019-08-31 04:10:06 +08:00
MV = mv
TOUCH = touch
FALSE = false
TAR = tar
TARFLAGS ?= -v --ignore-failed-read -r
TARFLAGS += -C .. -f
CROSS ?= arm-none-eabi-
CC = gcc
CXX = g++
LD = g++
PATHSEP=/
PREFIX ?= /usr/local
UDEV_PREFIX ?= /etc/udev/rules.d
INSTALLBINRELPATH ?= bin
INSTALLSHARERELPATH ?= share/proxmark3
INSTALLFWRELPATH ?= share/proxmark3/firmware
INSTALLTOOLSRELPATH ?= share/proxmark3/tools
INSTALLDOCSRELPATH ?= share/doc/proxmark3
2019-08-31 04:10:06 +08:00
platform = $(shell uname)
DETECTED_OS=$(platform)
ifeq ($(platform),Darwin)
AR= /usr/bin/ar rcs
RANLIB= /usr/bin/ranlib
else
AR= ar rcs
RANLIB= ranlib
endif
DEFCFLAGS = -Wall -Werror -O3
# Some more warnings we want as errors:
2020-05-04 03:43:03 +08:00
DEFCFLAGS += -Wredundant-decls -Wmissing-prototypes -Wchar-subscripts -Wshadow -Wundef -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Winline -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Wnested-externs -Wmissing-declarations
# Some more warnings we need first to eliminate, so temporarely tolerated:
2020-05-04 03:43:03 +08:00
DEFCFLAGS += -Wbad-function-cast -Wno-error=bad-function-cast -Wcast-align -Wno-error=cast-align
# TODO?:
#DEFCFLAGS += -Wextra -Wswitch-enum -Wold-style-definition
ifeq ($(platform),Darwin)
# their readline has strict-prototype issues
DEFCFLAGS += -Wstrict-prototypes -Wno-error=strict-prototypes
else
DEFCFLAGS += -Wstrict-prototypes
endif