OpenCores
URL https://opencores.org/ocsvn/mlite/mlite/trunk

Subversion Repositories mlite

[/] [mlite/] [trunk/] [tools/] [makefile] - Diff between revs 182 and 191

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 182 Rev 191
Line 1... Line 1...
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.
# The CC_X86 is for compiling tools on your PC.
# The CC_X86 is for compiling tools on your PC.
# The GCC_MIPS is for compiling code on the target.
# The GCC_MIPS is for compiling code on the target.
# Convert_bin changes test.exe into code.txt which is used by the VHDL.
# Convert_bin changes test.axf into code.txt which is used by the VHDL.
 
 
# Customize for Linux
# Customize for Linux
#CC_X86 = gcc -Wall -O -g
#CC_X86 = gcc -Wall -O -g
#CP = cp
#CP = cp
#RM = rm -rf
#RM = rm -rf
Line 48... Line 48...
ram_image.exe: ram_image.c
ram_image.exe: ram_image.c
        @$(CC_X86) -o ram_image.exe ram_image.c
        @$(CC_X86) -o ram_image.exe ram_image.c
 
 
opcodes:
opcodes:
        $(AS_MIPS) -o opcodes.o opcodes.asm
        $(AS_MIPS) -o opcodes.o opcodes.asm
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe opcodes.o
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf opcodes.o
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
opcodes2:
opcodes2:
        $(AS_MIPS) -o opcodes.o opcodes.asm
        $(AS_MIPS) -o opcodes.o opcodes.asm
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe opcodes.o
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf opcodes.o
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
test:
test:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) test.c
        $(GCC_MIPS) test.c
        $(GCC_MIPS) no_os.c
        $(GCC_MIPS) no_os.c
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
                boot.o test.o no_os.o
                boot.o test.o no_os.o
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        -@$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
count:
count:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) count.c
        $(GCC_MIPS) count.c
        $(GCC_MIPS) no_os.c
        $(GCC_MIPS) no_os.c
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
                boot.o count.o no_os.o
                boot.o count.o no_os.o
        -$(DUMP_MIPS) --disassemble test.exe > test.lst
        -$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
count2:
count2:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) count.c
        $(GCC_MIPS) count.c
        $(GCC_MIPS) no_os.c
        $(GCC_MIPS) no_os.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
                boot.o count.o no_os.o
                boot.o count.o no_os.o
        -$(DUMP_MIPS) --disassemble test.exe > test.lst
        -$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
pi:
pi:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) pi.c
        $(GCC_MIPS) pi.c
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
                boot.o pi.o
                boot.o pi.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
pi2:
pi2:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) pi.c
        $(GCC_MIPS) pi.c
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf \
                boot.o pi.o
                boot.o pi.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
bootldr:
bootldr:
        $(AS_MIPS) -o boot.o boot.asm
        $(AS_MIPS) -o boot.o boot.asm
        $(GCC_MIPS) bootldr.c
        $(GCC_MIPS) bootldr.c
        $(GCC_MIPS) no_os.c
        $(GCC_MIPS) no_os.c
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
                boot.o bootldr.o no_os.o
                boot.o bootldr.o no_os.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
bootldr_little_endian: convert_le.exe
bootldr_little_endian: convert_le.exe
        $(AS_MIPS) -EL -o boot.o boot.asm
        $(AS_MIPS) -EL -o boot.o boot.asm
        $(GCC_MIPS) -EL bootldr.c
        $(GCC_MIPS) -EL bootldr.c
        $(GCC_MIPS) -EL no_os.c
        $(GCC_MIPS) -EL no_os.c
        $(LD_MIPS) -EL -Ttext 0 -eentry -Map test.map -s -N -o test.exe \
        $(LD_MIPS) -EL -Ttext 0 -eentry -Map test.map -s -N -o test.axf \
                boot.o bootldr.o no_os.o
                boot.o bootldr.o no_os.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.axf > test.lst
        convert_le.exe
        convert_le.exe
        $(CP) code.txt $(VHDL_DIR)
        $(CP) code.txt $(VHDL_DIR)
 
 
# Run a MIPS opcode simulator
# Run a MIPS opcode simulator
run: mlite.exe
run: mlite.exe

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.