reintroduce PREFIX and use relative paths for finding share/ when installed, independently of PREFIX

This commit is contained in:
Philippe Teuwen
2019-08-30 21:36:10 +02:00
parent bfec7648bd
commit 4d31b2399b
5 changed files with 32 additions and 40 deletions

View File

@@ -66,12 +66,7 @@ INCLUDES_CLIENT = -I. -I../include -I../common -Iuart $(LIBS)
CFLAGS ?= -Wall -Werror -g -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)
ifneq (,$(PM3_BIN_PATH))
PM3CFLAGS += -DPM3_BIN_PATH=\"$(PM3_BIN_PATH)\"
endif
ifneq (,$(PM3_SHARE_PATH))
PM3CFLAGS += -DPM3_SHARE_PATH=\"$(PM3_SHARE_PATH)\"
endif
PREFIX ?= /usr/local
ifneq (,$(findstring MINGW,$(platform)))
PM3CFLAGS += -mno-ms-bitfields -fexec-charset=cp850
endif