mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
makefile: allow override of install paths
This commit is contained in:
parent
c709ee7c10
commit
e0cdb5d7a7
2 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,12 @@ FALSE = false
|
||||||
|
|
||||||
CFLAGS ?= -Wall -Werror -O3
|
CFLAGS ?= -Wall -Werror -O3
|
||||||
CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES)
|
CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES)
|
||||||
|
ifneq (,$(PM3_BIN_PATH))
|
||||||
|
CFLAGS += -DPM3_BIN_PATH=\"$(PM3_BIN_PATH)\"
|
||||||
|
endif
|
||||||
|
ifneq (,$(PM3_SHARE_PATH))
|
||||||
|
CFLAGS += -DPM3_SHARE_PATH=\"$(PM3_SHARE_PATH)\"
|
||||||
|
endif
|
||||||
|
|
||||||
platform = $(shell uname)
|
platform = $(shell uname)
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,12 @@ INCLUDES_CLIENT = -I. -I../include -I../common -Iuart $(LIBS)
|
||||||
CFLAGS ?= -Wall -Werror -g -O3
|
CFLAGS ?= -Wall -Werror -g -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 -D_ISOC99_SOURCE $(INCLUDES_CLIENT)
|
PM3CFLAGS = $(CFLAGS) -std=c99 -D_ISOC99_SOURCE $(INCLUDES_CLIENT)
|
||||||
|
ifneq (,$(PM3_BIN_PATH))
|
||||||
|
PM3CFLAGS += -DPM3_BIN_PATH=\"$(PM3_BIN_PATH)\"
|
||||||
|
endif
|
||||||
|
ifneq (,$(PM3_SHARE_PATH))
|
||||||
|
PM3CFLAGS += -DPM3_SHARE_PATH=\"$(PM3_SHARE_PATH)\"
|
||||||
|
endif
|
||||||
ifneq (,$(findstring MINGW,$(platform)))
|
ifneq (,$(findstring MINGW,$(platform)))
|
||||||
PM3CFLAGS += -mno-ms-bitfields
|
PM3CFLAGS += -mno-ms-bitfields
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue