create target for binary file archive (linux version)

This commit is contained in:
adam@algroup.co.uk 2010-05-09 12:17:42 +00:00
commit bd84638614
5 changed files with 33 additions and 4 deletions

View file

@ -1,5 +1,7 @@
include common/Makefile.common include common/Makefile.common
GZIP=gzip
all clean: %: bootrom/% armsrc/% client/% all clean: %: bootrom/% armsrc/% client/%
bootrom/%: FORCE bootrom/%: FORCE
@ -41,5 +43,12 @@ flash-both: armsrc/obj/osimage.elf armsrc/obj/fpgaimage.elf $(FLASH_TOOL)
flash-all: bootrom/obj/bootrom.elf armsrc/obj/osimage.elf armsrc/obj/fpgaimage.elf $(FLASH_TOOL) flash-all: bootrom/obj/bootrom.elf armsrc/obj/osimage.elf armsrc/obj/fpgaimage.elf $(FLASH_TOOL)
$(FLASH_TOOL) -b $(subst /,$(PATHSEP),$(filter-out $(FLASH_TOOL),$^)) $(FLASH_TOOL) -b $(subst /,$(PATHSEP),$(filter-out $(FLASH_TOOL),$^))
newtarbin:
$(DELETE) proxmark3-$(platform)-bin.tar proxmark3-$(platform)-bin.tar.gz
@touch proxmark3-$(platform)-bin.tar
tarbin: newtarbin client/tarbin armsrc/tarbin bootrom/tarbin
$(GZIP) proxmark3-$(platform)-bin.tar
# Dummy target to test for GNU make availability # Dummy target to test for GNU make availability
_test: _test:

View file

@ -44,7 +44,9 @@ APP_CFLAGS += -I.
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
include ../common/Makefile.common include ../common/Makefile.common
all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19 OBJS = $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
all: $(OBJS)
$(OBJDIR)/fpga.o: fpga.bit $(OBJDIR)/fpga.o: fpga.bit
$(OBJCOPY) -O elf32-littlearm -I binary -B arm --redefine-sym _binary____fpga_fpga_bit_start=_binary_fpga_bit_start --redefine-sym _binary____fpga_fpga_bit_end=_binary_fpga_bit_end --prefix-sections=fpga_bit $^ $@ $(OBJCOPY) -O elf32-littlearm -I binary -B arm --redefine-sym _binary____fpga_fpga_bit_start=_binary_fpga_bit_start --redefine-sym _binary____fpga_fpga_bit_end=_binary_fpga_bit_end --prefix-sections=fpga_bit $^ $@
@ -58,6 +60,10 @@ $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
$(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
$(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@ $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@
tarbin: $(OBJS)
$(TAR) $(TARFLAGS) ../proxmark3-$(platform)-bin.tar $(OBJS:%=armsrc/%) $(OBJS:%.s19=armsrc/%.elf)
clean: clean:
$(DELETE) $(OBJDIR)$(PATHSEP)*.o $(DELETE) $(OBJDIR)$(PATHSEP)*.o
$(DELETE) $(OBJDIR)$(PATHSEP)*.elf $(DELETE) $(OBJDIR)$(PATHSEP)*.elf

View file

@ -24,7 +24,12 @@ APP_CFLAGS = -I.
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
include ../common/Makefile.common include ../common/Makefile.common
all: $(OBJDIR)/bootrom.s19 OBJS = $(OBJDIR)/bootrom.s19
all: $(OBJS)
tarbin: $(OBJS)
$(TAR) $(TARFLAGS) ../proxmark3-$(platform)-bin.tar $(OBJS:%=bootrom/%) $(OBJS:%.s19=bootrom/%.elf)
$(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ) $(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)
$(CC) $(LDFLAGS) -Wl,-T,ldscript-flash,-Map,$(patsubst %.elf,%.map,$@) -o $@ $^ $(LIBS) $(CC) $(LDFLAGS) -Wl,-T,ldscript-flash,-Map,$(patsubst %.elf,%.map,$@) -o $@ $^ $(LIBS)

View file

@ -3,6 +3,8 @@
# at your option, any later version. See the LICENSE.txt file for the text of # at your option, any later version. See the LICENSE.txt file for the text of
# the license. # the license.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
include ../common/Makefile.common
CC=gcc CC=gcc
CXX=g++ CXX=g++
#COMMON_FLAGS = -m32 #COMMON_FLAGS = -m32
@ -14,8 +16,6 @@ LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
LDFLAGS = $(COMMON_FLAGS) LDFLAGS = $(COMMON_FLAGS)
CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3 CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
platform = $(shell uname)
ifneq (,$(findstring MINGW,$(platform))) ifneq (,$(findstring MINGW,$(platform)))
CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4 QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
@ -95,6 +95,9 @@ proxguiqt.moc.cpp: proxguiqt.h
clean: clean:
$(RM) $(CLEAN) $(RM) $(CLEAN)
tarbin: $(BINS)
$(TAR) $(TARFLAGS) ../proxmark3-$(platform)-bin.tar $(BINS:%=client/%)
# must be run as root # must be run as root
install_kext: Info.plist install_kext: Info.plist
mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents

View file

@ -15,6 +15,9 @@
# 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)
platform = $(shell uname)
all: all:
CROSS ?= arm-eabi- CROSS ?= arm-eabi-
@ -27,6 +30,9 @@ OBJDIR = obj
INCLUDE = -I../include -I../common INCLUDE = -I../include -I../common
TAR=tar
TARFLAGS = -C .. -rvf
# Windows' echo echos its input verbatim, on Posix there is some # Windows' echo echos its input verbatim, on Posix there is some
# amount of shell command line parsing going on. echo "" on # amount of shell command line parsing going on. echo "" on
# Windows yields literal "", on Linux yields an empty line # Windows yields literal "", on Linux yields an empty line