mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Make objcopy call less verbose
Add master Makefile
This commit is contained in:
parent
269a820f9e
commit
db335b3de0
4 changed files with 33 additions and 13 deletions
20
Makefile
Normal file
20
Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
include common/Makefile.common
|
||||
|
||||
ifeq ($(DETECTED_OS),Linux)
|
||||
HOST_BINARY=linux
|
||||
else
|
||||
HOST_BINARY=winsrc
|
||||
endif
|
||||
|
||||
all clean: %:
|
||||
$(MAKE) -C bootrom $@
|
||||
$(MAKE) -C armsrc $@
|
||||
$(MAKE) -C $(HOST_BINARY) $@
|
||||
|
||||
.PHONY: all clean help
|
||||
help:
|
||||
@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
|
||||
@echo Possible targets:
|
||||
@echo + all - Make bootrom, armsrc and the OS-specific host directory
|
||||
@echo + clean - Clean in bootrom, armsrc and the OS-specific host directory
|
||||
|
|
@ -14,7 +14,7 @@ all:
|
|||
# Windows yields literal "", on Linux yields an empty line
|
||||
ifeq ($(shell echo ""),)
|
||||
|
||||
# This is properly a proper system, so we can use uname
|
||||
# This is probably a proper system, so we can use uname
|
||||
UNAME := $(shell uname)
|
||||
ifeq ($(UNAME), Linux)
|
||||
# Linux. (Todo: Add MacOS X if appropriate)
|
||||
|
@ -73,15 +73,13 @@ $(VERSIONOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
|||
$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
|
||||
# This objcopy call translates physical flash addresses to logical addresses
|
||||
# without touching start address or RAM addresses (.bss and .data sections)
|
||||
# See ldscript.common. -- Henryk Plötz <henryk@ploetzli.ch> 2009-08-27
|
||||
$(OBJDIR)/%.s19: $(OBJDIR)/%.elf
|
||||
$(OBJCOPY) -Osrec --srec-forceS3 --no-change-warnings \
|
||||
--change-section-address .bootphase1-0x100000 \
|
||||
--change-section-address .bootphase2-0x100000 \
|
||||
--change-section-address .fpgaimage-0x100000 \
|
||||
--change-section-address .start-0x100000 \
|
||||
--change-section-address .text-0x100000 \
|
||||
--change-section-address .rodata-0x100000 $^ $@
|
||||
$(OBJCOPY) -Osrec --srec-forceS3 --strip-debug --no-change-warnings \
|
||||
--change-addresses -0x100000 --change-start 0 \
|
||||
--change-section-address .bss+0 \
|
||||
--change-section-address .data+0 $^ $@
|
||||
|
||||
# version.c should be remade on every compilation
|
||||
.PHONY: version.c
|
||||
|
|
|
@ -3,7 +3,7 @@ include ../common/Makefile.common
|
|||
all: fpga.ngc fpga.ngd fpga.ncd fpga-placed.ncd fpga.bit
|
||||
clean:
|
||||
$(DELETE) fpga.bgn fpga.drc fpga.ncd fpga.ngd fpga_par.xrpt fpga-placed.pad fpga-placed.par fpga-placed.xpi fpga_usage.xml xlnx_auto_0.ise xst.srp
|
||||
$(DELETE) fpga.bit fpga.map fpga.ngc fpga_ngdbuild.xrpt fpga.pcf fpga-placed_pad.csv fpga-placed.ptwx fpga.rbt xlnx_auto_0_xdb
|
||||
$(DELETE) fpga.map fpga.ngc fpga_ngdbuild.xrpt fpga.pcf fpga-placed_pad.csv fpga-placed.ptwx fpga.rbt xlnx_auto_0_xdb
|
||||
$(DELETE) fpga.bld fpga.mrp fpga.ngc_xst.xrpt fpga.ngm fpga-placed.ncd fpga-placed_pad.txt fpga-placed.unroutes fpga_summary.xml netlist.lst xst
|
||||
|
||||
fpga.ngc: fpga.v fpga.ucf xst.scr util.v lo_simulate.v lo_read.v lo_passthru.v hi_simulate.v hi_read_tx.v hi_read_rx_xcorr.v hi_iso14443a.v
|
||||
|
@ -31,6 +31,6 @@ fpga.bit: fpga-placed.ncd
|
|||
help:
|
||||
@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
|
||||
@echo Possible targets:
|
||||
@echo + all - Make fpga.bti, the FPGA bitstream
|
||||
@echo + clean - Clean intermediate files
|
||||
|
||||
@echo + all - Make fpga.bit, the FPGA bitstream
|
||||
@echo + clean - Clean intermediate files, does not clean fpga.bit
|
||||
|
||||
|
|
|
@ -16,7 +16,9 @@ LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.li
|
|||
|
||||
HEADERS = prox.h
|
||||
|
||||
all: $(OBJDIR)/prox.exe
|
||||
all: prox.exe
|
||||
|
||||
prox.exe: $(OBJDIR)/prox.exe
|
||||
copy $(OBJDIR)\prox.exe .
|
||||
|
||||
clean:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue