--- /dev/null
+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
# 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)
$(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
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
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
+
\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