]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Make objcopy call less verbose
authorhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 30 Aug 2009 22:35:12 +0000 (22:35 +0000)
committerhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 30 Aug 2009 22:35:12 +0000 (22:35 +0000)
Add master Makefile

Makefile [new file with mode: 0644]
common/Makefile.common
fpga/Makefile
winsrc/Makefile

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..2c95cc1
--- /dev/null
+++ b/Makefile
@@ -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
+       
\ No newline at end of file
index 901ce2e155d44ba5f06fed91a87128a07efa01e1..bba99ecd1e01e5766bee1698e71fc9a877c6024b 100644 (file)
@@ -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
index 84155b4cd2a9cc8f8c6d739e9d3d464efafcdb25..d598c8dede590d1d987df27fe627d044a60ee393 100644 (file)
@@ -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
-       
\ No newline at end of file
+       @echo + all   - Make fpga.bit, the FPGA bitstream 
+       @echo + clean - Clean intermediate files, does not clean fpga.bit
+       
index 637fa319e918a774ffed08003565d4e371e2d405..71dce86617da169bacff273c971cc313e6a01fcd 100644 (file)
@@ -16,7 +16,9 @@ LIBS   = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.li
 \r
 HEADERS = prox.h\r
 \r
-all: $(OBJDIR)/prox.exe\r
+all: prox.exe\r
+\r
+prox.exe: $(OBJDIR)/prox.exe\r
     copy $(OBJDIR)\prox.exe .\r
 \r
 clean:\r
Impressum, Datenschutz