mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
Add Makefile.defs with common defs
This commit is contained in:
parent
d772c6169a
commit
3245260c00
5 changed files with 72 additions and 90 deletions
11
Makefile
11
Makefile
|
@ -1,14 +1,5 @@
|
||||||
# Hide full compilation line:
|
|
||||||
ifneq ($(V),1)
|
|
||||||
Q?=@
|
|
||||||
endif
|
|
||||||
# To see full command lines, use make V=1
|
|
||||||
|
|
||||||
CP = cp -a
|
include Makefile.defs
|
||||||
GZIP=gzip
|
|
||||||
MKDIR = mkdir -p
|
|
||||||
RM = rm -f
|
|
||||||
RMDIR = rm -rf
|
|
||||||
-include Makefile.platform
|
-include Makefile.platform
|
||||||
-include .Makefile.options.cache
|
-include .Makefile.options.cache
|
||||||
include common_arm/Makefile.hal
|
include common_arm/Makefile.hal
|
||||||
|
|
42
Makefile.defs
Normal file
42
Makefile.defs
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# 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
|
||||||
|
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
|
||||||
|
INSTALLBINRELPATH = /bin/
|
||||||
|
INSTALLSHARERELPATH = /share/proxmark3/
|
||||||
|
INSTALLFWRELPATH = /share/proxmark3/firmware/
|
||||||
|
INSTALLTOOLSRELPATH = /share/proxmark3/tools/
|
||||||
|
|
||||||
|
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
|
|
@ -1,36 +1,19 @@
|
||||||
# Hide full compilation line:
|
# This Makefile might have been called from various subdirs, trying to find our Makefile.defs
|
||||||
ifneq ($(V),1)
|
ifeq ($(DEFSBEENHERE),)
|
||||||
Q?=@
|
-include Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
-include ../Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
-include ../../Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
$(error Can't find Makefile.defs)
|
||||||
endif
|
endif
|
||||||
# To see full command lines, use make V=1
|
|
||||||
|
|
||||||
INSTALLBINRELPATH = /bin/
|
|
||||||
INSTALLTOOLSRELPATH = /share/proxmark3/tools/
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
LD = gcc
|
|
||||||
RM = rm -f
|
|
||||||
MV = mv
|
|
||||||
CP = cp -a
|
|
||||||
MKDIR = mkdir -p
|
|
||||||
TOUCH = touch
|
|
||||||
FALSE = false
|
|
||||||
|
|
||||||
CFLAGS ?= -Wall -Werror -O3
|
CFLAGS ?= -Wall -Werror -O3
|
||||||
CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES)
|
CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES)
|
||||||
PREFIX ?= /usr/local
|
|
||||||
|
|
||||||
platform = $(shell uname)
|
|
||||||
|
|
||||||
ifeq ($(platform),Darwin)
|
|
||||||
AR= /usr/bin/ar rcs
|
|
||||||
RANLIB= /usr/bin/ranlib
|
|
||||||
else
|
|
||||||
AR= ar rcs
|
|
||||||
RANLIB= ranlib
|
|
||||||
endif
|
|
||||||
RM= rm -f
|
|
||||||
RMDIR= rm -rf
|
|
||||||
|
|
||||||
vpath %.c $(MYSRCPATHS)
|
vpath %.c $(MYSRCPATHS)
|
||||||
|
|
||||||
|
|
|
@ -9,34 +9,14 @@
|
||||||
# Add -DNOFORCE to disable the -F switch
|
# Add -DNOFORCE to disable the -F switch
|
||||||
# Add -DPRESETS to compile with preset models (edit config.h)
|
# Add -DPRESETS to compile with preset models (edit config.h)
|
||||||
|
|
||||||
# Hide full compilation line:
|
# Must be called before any Makefile include
|
||||||
ifneq ($(V),1)
|
ROOT_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
Q?=@
|
|
||||||
endif
|
include ../Makefile.defs
|
||||||
# To see full command lines, use make V=1
|
|
||||||
|
|
||||||
INSTALLBINRELPATH = /bin/
|
|
||||||
INSTALLSHARERELPATH = /share/proxmark3/
|
|
||||||
INSTALLBIN = proxmark3 proxmark3-flasher
|
INSTALLBIN = proxmark3 proxmark3-flasher
|
||||||
INSTALLSHARE = lualibs luascripts resources dictionaries
|
INSTALLSHARE = lualibs luascripts resources dictionaries
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
CXX = g++
|
|
||||||
LD = g++
|
|
||||||
TAR = tar
|
|
||||||
TARFLAGS ?= -v --ignore-failed-read -r
|
|
||||||
TARFLAGS += -C .. -f
|
|
||||||
RM = rm -f
|
|
||||||
RMDIR= rm -rf
|
|
||||||
MKDIR = mkdir -p
|
|
||||||
MV = mv
|
|
||||||
TOUCH = touch
|
|
||||||
FALSE = false
|
|
||||||
CP=cp -a
|
|
||||||
|
|
||||||
platform = $(shell uname)
|
|
||||||
ROOT_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
||||||
|
|
||||||
VPATH = ../common uart
|
VPATH = ../common uart
|
||||||
vpath %.dic dictionaries
|
vpath %.dic dictionaries
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
|
|
|
@ -6,48 +6,34 @@
|
||||||
# Common makefile functions for all platforms
|
# Common makefile functions for all platforms
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
# This new makefile replaces the previous Makefile/Makefile.linux
|
|
||||||
# with as much common code for both environments as possible.
|
|
||||||
# Following is a short OS detection to set up variables, all the
|
|
||||||
# remaining Makefile should be portable and only depend on these
|
|
||||||
# variables
|
|
||||||
#
|
|
||||||
|
|
||||||
ifneq ($(V),1)
|
|
||||||
Q?=@
|
|
||||||
endif
|
|
||||||
# To see full command lines, use make V=1
|
|
||||||
|
|
||||||
# Make sure that all is the default target
|
# Make sure that all is the default target
|
||||||
# (The including Makefile still needs to define what 'all' is)
|
# (The including Makefile still needs to define what 'all' is)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
platform = $(shell uname)
|
# This Makefile might have been called from various subdirs, trying to find our Makefile.defs
|
||||||
PREFIX?=/usr/local
|
ifeq ($(DEFSBEENHERE),)
|
||||||
INSTALLFWRELPATH = /share/proxmark3/firmware/
|
-include Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
-include ../Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
-include ../../Makefile.defs
|
||||||
|
endif
|
||||||
|
ifeq ($(DEFSBEENHERE),)
|
||||||
|
$(error Can't find Makefile.defs)
|
||||||
|
endif
|
||||||
|
|
||||||
CROSS ?= arm-none-eabi-
|
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS)gcc
|
||||||
AS = $(CROSS)as
|
AS = $(CROSS)as
|
||||||
LD = $(CROSS)ld
|
LD = $(CROSS)ld
|
||||||
OBJCOPY = $(CROSS)objcopy
|
OBJCOPY = $(CROSS)objcopy
|
||||||
GZIP=gzip
|
|
||||||
MV=mv
|
|
||||||
|
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
|
|
||||||
INCLUDE = -I../include -I../common_arm -I../common_fpga -I../common -I.
|
INCLUDE = -I../include -I../common_arm -I../common_fpga -I../common -I.
|
||||||
|
|
||||||
TAR=tar
|
|
||||||
TARFLAGS = -C .. -rvf
|
|
||||||
RM=rm -f
|
|
||||||
RMDIR=rm -rf
|
|
||||||
CP=cp -a
|
|
||||||
MKDIR=mkdir -p
|
|
||||||
PATHSEP=/
|
|
||||||
DETECTED_OS=$(platform)
|
|
||||||
|
|
||||||
# Also search prerequisites in the common directory (for usb.c), the fpga directory (for fpga.bit), and the zlib directory
|
# Also search prerequisites in the common directory (for usb.c), the fpga directory (for fpga.bit), and the zlib directory
|
||||||
VPATH = . ../common_arm ../common ../common/crapto1 ../common/mbedtls ../common/zlib ../fpga ../armsrc/Standalone
|
VPATH = . ../common_arm ../common ../common/crapto1 ../common/mbedtls ../common/zlib ../fpga ../armsrc/Standalone
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue