fix: zlib compilation on mingw / ps, (@doegox)
[RRG-proxmark3.git] / Makefile.defs
blob0cfdf85a75597fe54d7d4ea2f6430674e4a424b9
1 # Hide full compilation line:
2 ifneq ($(V),1)
3   Q?=@
4 endif
5 # To see full command lines, use make V=1
7 # been here
8 DEFSBEENHERE = true
10 CP = cp -a
11 GZIP = gzip
12 MKDIR = mkdir -p
13 RM = rm -f
14 RMDIR = rm -rf
15 # rmdir only if dir is empty, tolerate failure
16 RMDIR_SOFT = -rmdir
17 MV = mv
18 TOUCH = touch
19 FALSE = false
20 TAR = tar
21 TARFLAGS ?= -v --ignore-failed-read -r
22 TARFLAGS += -C .. -f
23 CROSS  ?= arm-none-eabi-
24 CC = gcc
25 CXX = g++
26 LD = g++
28 PATHSEP=/
29 PREFIX ?=              /usr/local
30 UDEV_PREFIX ?=         /etc/udev/rules.d
31 INSTALLBINRELPATH ?=   bin
32 INSTALLSHARERELPATH ?= share/proxmark3
33 INSTALLFWRELPATH ?=    share/proxmark3/firmware
34 INSTALLTOOLSRELPATH ?= share/proxmark3/tools
35 INSTALLDOCSRELPATH ?=  share/doc/proxmark3
37 platform = $(shell uname)
38 DETECTED_OS=$(platform)
40 ifeq ($(platform),Darwin)
41     AR= /usr/bin/ar rcs
42     RANLIB= /usr/bin/ranlib
43 else
44     AR= ar rcs
45     RANLIB= ranlib
46 endif
48 DEFCFLAGS = -Wall -Werror -O3
49 # Some more warnings we want as errors:
50 DEFCFLAGS += -Wcast-align -Wbad-function-cast -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 -Wempty-body -Wignored-qualifiers
51 # Some more warnings we need first to eliminate, so temporarely tolerated:
52 DEFCFLAGS += -Wno-error=cast-align
53 # TODO?:
54 #DEFCFLAGS += -Wunused-parameter -Wold-style-declaration -Wsign-compare -Wimplicit-fallthrough=3 -Wtype-limits -Wmissing-field-initializers -Wunused-but-set-parameter -Wswitch-enum -Wold-style-definition
55 #DEFCFLAGS += -Wno-error=unused-parameter -Wno-error=old-style-declaration -Wno-error=sign-compare -Wno-error=implicit-fallthrough -Wno-error=type-limits -Wno-error=missing-field-initializers -Wno-error=unused-but-set-parameter -Wno-error=switch-enum -Wno-error=old-style-definition
56 # unknown to clang:     -Wclobbered -Wmissing-parameter-type -Wcast-function-type
57 # unknown to clang < 8: -Woverride-init
58 # unknown to gcc < 6:   -Wshift-negative-value
60 ifeq ($(platform),Darwin)
61 # their readline has strict-prototype issues
62 DEFCFLAGS += -Wstrict-prototypes -Wno-error=strict-prototypes
63 else
64 DEFCFLAGS += -Wstrict-prototypes
65 endif