version 4.2.0
[fx2fw-sdcc] / Makefile
index 8af9262..a0ba08a 100644 (file)
--- a/Makefile
+++ b/Makefile
 #-----------------------------------------------------------------------------\r
-\r
 # Makefile for usb_jtag FX2 firmware\r
-\r
 #-----------------------------------------------------------------------------\r
-\r
 # Copyright 2007 Kolja Waschk, ixo.de\r
-\r
 #-----------------------------------------------------------------------------\r
-\r
 # This code is part of usbjtag. usbjtag is free software; you can redistribute\r
-\r
 # it and/or modify it under the terms of the GNU General Public License as\r
-\r
 # published by the Free Software Foundation; either version 2 of the License,\r
-\r
 # or (at your option) any later version. usbjtag is distributed in the hope\r
-\r
 # that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\r
-\r
 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-\r
 # GNU General Public License for more details.  You should have received a\r
-\r
 # copy of the GNU General Public License along with this program in the file\r
-\r
 # COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin\r
-\r
 # St, Fifth Floor, Boston, MA  02110-1301  USA\r
-\r
 #-----------------------------------------------------------------------------\r
 \r
-\r
-\r
 LIBDIR=fx2\r
-\r
 LIB=libfx2.lib\r
 \r
-\r
-\r
 ifeq (${HARDWARE},)\r
-\r
   HARDWARE=hw_basic\r
-\r
+  #HARDWARE=hw_saxo_l\r
   #HARDWARE=hw_xpcu_i\r
-\r
   #HARDWARE=hw_xpcu_x\r
-\r
 endif\r
 \r
-\r
-\r
 CC=sdcc\r
-\r
 CFLAGS+=-mmcs51 --no-xinit-opt -I${LIBDIR} -D${HARDWARE}\r
 \r
 CFLAGS+=--opt-code-size\r
 \r
-\r
-\r
 AS=asx8051\r
-\r
 ASFLAGS+=-plosgff\r
 \r
-\r
-\r
 LDFLAGS=--code-loc 0x0000 --code-size 0x1800\r
-\r
 LDFLAGS+=--xram-loc 0x1800 --xram-size 0x0800\r
-\r
 LDFLAGS+=-Wl '-b USBDESCSEG = 0xE100'\r
-\r
 LDFLAGS+=-L ${LIBDIR}\r
 \r
-\r
-\r
 %.rel : %.a51\r
-\r
        $(AS) $(ASFLAGS) $<\r
 \r
-\r
-\r
 %.rel : %.c\r
-\r
        $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@\r
 \r
-\r
+default: usbjtag.iic\r
 \r
 %.iic : %.hex\r
-\r
        ./hex2bix -ir -f 0xC2 -m 0xF000 -c 0x1 -o $@ $<\r
 \r
-\r
-\r
-default: usbjtag.iic\r
-\r
-\r
-\r
 usbjtag.hex: vectors.rel usbjtag.rel dscr.rel eeprom.rel ${HARDWARE}.rel startup.rel ${LIBDIR}/${LIB}\r
-\r
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+\r
-\r
        packihx $@ > .tmp.hex\r
-\r
        rm $@\r
-\r
        mv .tmp.hex $@\r
 \r
-\r
-\r
 ${LIBDIR}/${LIB}:\r
-\r
        make -C ${LIBDIR}\r
 \r
-\r
-\r
 .PHONY: boot\r
-\r
 boot: usbjtag.hex\r
-\r
        -test -e /dev/usb_jtag    && /sbin/fxload -D /dev/usb_jtag    -I usbjtag.hex -t fx2\r
-\r
        -test -e /dev/tracii_xl2  && /sbin/fxload -D /dev/tracii_xl2  -I usbjtag.hex -t fx2\r
-\r
        -test -e /dev/xilinx_xpcu && /sbin/fxload -D /dev/xilinx_xpcu -I usbjtag.hex -t fx2\r
 \r
-\r
-\r
 REF=/home/kawk/work/xilinx/xtern/xusbdfwu/xusbdfwu-1025.hex\r
 \r
-\r
-\r
 .PHONY: ref\r
-\r
 ref: \r
-\r
        -test -e /dev/usb_jtag    && /sbin/fxload -D /dev/usb_jtag    -I ${REF} -t fx2\r
-\r
        -test -e /dev/tracii_xl2  && /sbin/fxload -D /dev/tracii_xl2  -I ${REF} -t fx2\r
-\r
        -test -e /dev/xilinx_xpcu && /sbin/fxload -D /dev/xilinx_xpcu -I ${REF} -t fx2\r
 \r
-\r
-\r
 dscr.rel: dscr.a51\r
-\r
 eeprom.rel: eeprom.c eeprom.h\r
-\r
 usbjtag.rel: usbjtag.c hardware.h eeprom.h\r
-\r
 ${HARDWARE}.rel: ${HARDWARE}.c hardware.h\r
 \r
-\r
-\r
 .PHONY: clean distclean\r
 \r
-\r
-\r
 clean:\r
-\r
        make -C ${LIBDIR} clean\r
-\r
        rm -f *.lst *.asm *.lib *.sym *.rel *.mem *.map *.rst *.lnk *.hex *.ihx *.iic\r
 \r
-\r
-\r
 distclean: clean\r
 \r
 \r
 \r
-\r
-\r
-\r
-\r