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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sim/] [bin/] [Makefile] - Diff between revs 499 and 500

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

Rev 499 Rev 500
Line 426... Line 426...
# Path for the current test
# Path for the current test
TEST_SW_DIR=$(SW_DIR)/tests/$(shell echo $(TEST) | cut -d "-" -f 1)/sim
TEST_SW_DIR=$(SW_DIR)/tests/$(shell echo $(TEST) | cut -d "-" -f 1)/sim
 
 
# This file name corresponds to the VMEM file the RAM models will attempt to
# This file name corresponds to the VMEM file the RAM models will attempt to
# load via $readmemh().
# load via $readmemh().
SIM_VMEM_IMAGE ?=sram.vmem
SIM_DIR_VMEM_IMAGE ?=sram.vmem
 
 
ifeq ($(USER_ELF),)
ifeq ($(USER_ELF),)
ELF_FILE=$(TEST_SW_DIR)/$(TEST).elf
ELF_FILE=$(TEST_SW_DIR)/$(TEST).elf
else
else
ELF_FILE=$(USER_ELF)
ELF_FILE=$(USER_ELF)
Line 446... Line 446...
 
 
 
 
# If USER_ELF was specified, then we need a slightly different way of
# If USER_ELF was specified, then we need a slightly different way of
# generating the VMEM file from it than a usual test
# generating the VMEM file from it than a usual test
ifeq ($(USER_ELF),)
ifeq ($(USER_ELF),)
$(SIM_VMEM_IMAGE): $(VMEM_FILE)
$(SIM_DIR_VMEM_IMAGE): $(VMEM_FILE)
        $(Q)if [ -L $@ ]; then unlink $@; fi
        $(Q)if [ -L $@ ]; then unlink $@; fi
        $(Q)if [ -e $@ ]; then rm $@; fi
        $(Q)if [ -e $@ ]; then rm $@; fi
        $(Q)ln -s $< $@
        $(Q)ln -s $< $@
else
else
$(SIM_VMEM_IMAGE): $(USER_ELF)
$(SIM_DIR_VMEM_IMAGE): $(USER_ELF)
        $(Q)$(MAKE) -C $(SW_DIR)/lib \
        $(Q)$(MAKE) -C $(SW_DIR)/lib \
        USER_ELF_BIN=`pwd`/$(ELF_FILE_NOTDIR_BASENAME).bin \
        USER_ELF_BIN=`pwd`/$(ELF_FILE_NOTDIR_BASENAME).bin \
        USER_ELF_VMEM=`pwd`/$(ELF_FILE_NOTDIR_BASENAME).vmem \
        USER_ELF_VMEM=`pwd`/$(ELF_FILE_NOTDIR_BASENAME).vmem \
        gen-user-elf-vmem
        gen-user-elf-vmem
        $(Q)cp -v $(ELF_FILE_NOTDIR_BASENAME).vmem $@
        $(Q)cp -v $(ELF_FILE_NOTDIR_BASENAME).vmem $@
Line 466... Line 466...
else
else
VMEM_FILE=$(USER_VMEM)
VMEM_FILE=$(USER_VMEM)
USER_VMEM_NOTDIR=$(notdir $(USER_VMEM))
USER_VMEM_NOTDIR=$(notdir $(USER_VMEM))
TEST=$(basename $(USER_VMEM_NOTDIR))
TEST=$(basename $(USER_VMEM_NOTDIR))
 
 
$(SIM_VMEM_IMAGE): $(VMEM_FILE)
$(SIM_DIR_VMEM_IMAGE): $(VMEM_FILE)
        cp -v $< $@
        cp -v $< $@
 
 
endif
endif
 
 
 
 
 
 
 
 
.PHONY : sw-vmem sw-elf
.PHONY : sw-vmem sw-elf
sw-vmem: $(SIM_VMEM_IMAGE)
sw-vmem: $(SIM_DIR_VMEM_IMAGE)
 
 
$(TEST_SW_DIR)/$(TEST).vmem:
$(TEST_SW_DIR)/$(TEST).vmem:
        $(Q) echo; echo "\t### Compiling software ###"; echo;
        $(Q) echo; echo "\t### Compiling software ###"; echo;
        $(Q)$(MAKE) -C $(TEST_SW_DIR) $(TEST).vmem
        $(Q)$(MAKE) -C $(TEST_SW_DIR) $(TEST).vmem
 
 
Line 533... Line 533...
 
 
clean-test-defines:
clean-test-defines:
        $(Q)rm -f $(TEST_DEFINES_VLG)
        $(Q)rm -f $(TEST_DEFINES_VLG)
 
 
clean-sim-test-sw:
clean-sim-test-sw:
        $(Q)if [ -L $(SIM_VMEM_IMAGE) ]; then unlink $(SIM_VMEM_IMAGE); fi
        $(Q)if [ -L $(SIM_DIR_VMEM_IMAGE) ]; then unlink $(SIM_DIR_VMEM_IMAGE); fi
 
 
clean-sw:
clean-sw:
        $(Q) echo; echo "\t### Cleaning simulation sw directories ###"; echo;
        $(Q) echo; echo "\t### Cleaning simulation sw directories ###"; echo;
        $(Q) $(MAKE) -C $(SW_DIR)/lib distclean
        $(Q) $(MAKE) -C $(SW_DIR)/lib distclean
 
 

powered by: WebSVN 2.1.0

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