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

Subversion Repositories mlite

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

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

Rev 179 Rev 182
Line 6... Line 6...
# 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
#BIN_MIPS  =../../mips/sde/bin
#BIN_MIPS  =../../mips/sde/bin
 
#VHDL_DIR = ../vhdl
 
 
# Customize for Windows
# Customize for Windows
CC_X86 = cl /O1
CC_X86 = cl /O1
CP = copy
CP = copy
RM = del
RM = del
BIN_MIPS  =../gccmips_elf
BIN_MIPS  =../gccmips_elf
 
VHDL_DIR = ..\vhdl
 
 
CFLAGS = -O2 -Wall -c -s
CFLAGS = -O2 -Wall -c -s
 
 
 
 
GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
GCC_MIPS  = $(BIN_MIPS)/gcc $(CFLAGS)
AS_MIPS   = $(BIN_MIPS)/as
AS_MIPS   = $(BIN_MIPS)/as
LD_MIPS   = $(BIN_MIPS)/ld
LD_MIPS   = $(BIN_MIPS)/ld
DUMP_MIPS = $(BIN_MIPS)/objdump
DUMP_MIPS = $(BIN_MIPS)/objdump
 
 
Line 50... Line 51...
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.exe opcodes.o
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe opcodes.o
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        -@$(DUMP_MIPS) --disassemble test.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                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.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                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.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                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.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                boot.o pi.o
                boot.o pi.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                boot.o pi.o
                boot.o pi.o
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        @$(DUMP_MIPS) --disassemble test.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                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.exe > test.lst
        convert_bin.exe
        convert_bin.exe
        $(CP) code.txt ../vhdl
        $(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.exe \
                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.exe > test.lst
        convert_le.exe
        convert_le.exe
        $(CP) code.txt ../vhdl
        $(CP) code.txt $(VHDL_DIR)
 
 
# Run a MIPS opcode simulator
# Run a MIPS opcode simulator
run: mlite.exe
run: mlite.exe
        @mlite.exe test.bin
        @mlite.exe test.bin
 
 
Line 140... Line 141...
        -@mlite.exe test.bin BD > test.txt
        -@mlite.exe test.bin BD > test.txt
 
 
# Used by Altera FPGAs for ram image
# Used by Altera FPGAs for ram image
tohex:
tohex:
        bintohex.exe test2.exe
        bintohex.exe test2.exe
        $(CP) code*.hex ../vhdl
        $(CP) code*.hex $(VHDL_DIR)
 
 
# Used by Xilinx FPGAs for ram image
# Used by Xilinx FPGAs for ram image
toimage:
toimage:
        ram_image.exe ../vhdl/ram_xilinx.vhd ../vhdl/code.txt ../vhdl/ram_image.vhd
        ram_image.exe ../vhdl/ram_xilinx.vhd ../vhdl/code.txt ../vhdl/ram_image.vhd
 
 

powered by: WebSVN 2.1.0

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