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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [Makefile.inc] - Diff between revs 403 and 408

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

Rev 403 Rev 408
Line 49... Line 49...
# If BOARD_PATH is set, we'll first scan that path for which drivers they have
# If BOARD_PATH is set, we'll first scan that path for which drivers they have
# and will override any locally named driver directories here.
# and will override any locally named driver directories here.
ifdef BOARD_PATH
ifdef BOARD_PATH
#$(info BOARD_PATH is being used: $(BOARD_PATH))
#$(info BOARD_PATH is being used: $(BOARD_PATH))
BOARD_SPECIFIC_DRIVERS=$(shell if [ -e $(BOARD_PATH)/sw/drivers ]; then ls $(BOARD_PATH)/sw/drivers; fi)
BOARD_SPECIFIC_DRIVERS=$(shell if [ -e $(BOARD_PATH)/sw/drivers ]; then ls $(BOARD_PATH)/sw/drivers; fi)
 
BOARD_SW_TESTS=$(shell if [ -e $(BOARD_PATH)/sw/tests ]; then ls $(BOARD_PATH)/sw/tests; fi)
endif
endif
 
 
COMMON_SW_DRIVERS=$(shell ls $(SW_ROOT)/drivers )
COMMON_SW_DRIVERS=$(shell ls $(SW_ROOT)/drivers )
COMMON_SW_DRIVERS_WITHOUT_BOARD_DRIVERS=$(filter-out $(BOARD_SPECIFIC_DRIVERS),$(COMMON_SW_DRIVERS))
COMMON_SW_DRIVERS_WITHOUT_BOARD_DRIVERS=$(filter-out $(BOARD_SPECIFIC_DRIVERS),$(COMMON_SW_DRIVERS))
 
 
Line 78... Line 79...
        $(Q)echo "\tCommon sw drivers without board drivers"; echo;
        $(Q)echo "\tCommon sw drivers without board drivers"; echo;
        @echo $(COMMON_SW_DRIVERS_WITHOUT_BOARD_DRIVERS); echo; echo;
        @echo $(COMMON_SW_DRIVERS_WITHOUT_BOARD_DRIVERS); echo; echo;
        $(Q)echo "\tAll drivers and their paths"; echo;
        $(Q)echo "\tAll drivers and their paths"; echo;
        @echo $(SW_DRIVER_PATHS); echo; echo
        @echo $(SW_DRIVER_PATHS); echo; echo
 
 
 
print-include-paths:
 
        $(Q)echo "\tSoftware include paths"; echo;
 
        @echo $(INCLUDE_FLAGS); echo; echo
 
 
# If BOARD_PATH isn't set, then we're not compiling for a board, so use the
# If BOARD_PATH isn't set, then we're not compiling for a board, so use the
# generic board.h include path, otherwise, use that board's
# generic board.h include path, otherwise, use that board's
ifdef BOARD_PATH
ifdef BOARD_PATH
INCLUDE_FLAGS +=-I$(BOARD_PATH)/sw/board/include
INCLUDE_FLAGS +=-I$(BOARD_PATH)/sw/board/include
Line 99... Line 103...
# All driver compilations will generate an object file of this name to be
# All driver compilations will generate an object file of this name to be
# included into the liborpsoc library
# included into the liborpsoc library
DRIVER_OBJ=compiled.o
DRIVER_OBJ=compiled.o
 
 
# Machine flags - uncomment one or create custom combination of flags
# Machine flags - uncomment one or create custom combination of flags
# All software div, mul and FPU
 
#MACH_FLAGS ?=-msoft-mul -msoft-div -msoft-float
 
# FPGA default - only hardware multiply
 
#MACH_FLAGS ?=-mhard-mul -msoft-div -msoft-float
 
# All hardware flags
# All hardware flags
#MARCH_FLAGS ?=-mhard-mul -mhard-div -mhard-float
#MARCH_FLAGS ?=-mhard-mul -mhard-div -mhard-float
# Hardware integer arith, soft float
# Hardware integer arith, soft float
MARCH_FLAGS ?=-mhard-mul -mhard-div -msoft-float
MARCH_FLAGS ?=-mhard-mul -mhard-div -msoft-float
 
# FPGA default - only hardware multiply
 
#MACH_FLAGS ?=-mhard-mul -msoft-div -msoft-float
 
# All software div, mul and FPU
 
#MACH_FLAGS ?=-msoft-mul -msoft-div -msoft-float
 
 
OR32_CFLAGS ?=-g -nostdlib -O2 $(MARCH_FLAGS) \
OR32_CFLAGS ?=-g -nostdlib -O2 $(MARCH_FLAGS) \
                $(INCLUDE_FLAGS) \
                $(INCLUDE_FLAGS) \
                -I$(SW_ROOT)/lib/include
                -I$(SW_ROOT)/lib/include
 
 
Line 205... Line 209...
$(VECTORS_OBJ):
$(VECTORS_OBJ):
        $(Q)$(MAKE) -C $(CPU_DRIVER) crt0.o
        $(Q)$(MAKE) -C $(CPU_DRIVER) crt0.o
 
 
 
 
# Get a list of the tests
# Get a list of the tests
SW_TESTS=$(shell ls $(SW_ROOT)/tests)
COMMON_SW_TESTS=$(shell ls $(SW_ROOT)/tests)
 
 
# A list of the directories in each test directory (not always the same) and
# A list of the directories in each test directory (not always the same) and
# get a list of what's in them.
# get a list of what's in them.
SW_TESTS_SUBDIRS=$(shell for test in $(SW_TESTS); do ls -d $(SW_ROOT)/tests/$$test/*; done)
SW_TESTS_SUBDIRS=$(shell for test in $(COMMON_SW_TESTS); do ls -d $(SW_ROOT)/tests/$$test/*; done)
 
 
 
# Add board test paths, if any, to be cleaned too
 
ifdef BOARD_PATH
 
SW_TESTS_SUBDIRS +=$(shell for test in $(BOARD_SW_TESTS); do ls -d $(BOARD_PATH)/sw/tests/$$test/*; done)
 
endif
 
 
print-sw-tests:
print-sw-tests:
        $(Q)echo; echo "\tSoftware tests"; echo;
        $(Q)echo; echo "\tSoftware tests"; echo;
        $(Q)echo $(SW_TESTS); echo
        $(Q)echo $(COMMON_SW_TESTS); echo
 
        $(Q)echo; echo "\tSoftware tests in board path (if any)"; echo;
 
        $(Q)echo $(BOARD_SW_TESTS); echo
 
 
print-sw-tests-subdirs:
print-sw-tests-subdirs:
        $(Q)echo; echo "\tSoftware tests subdirs"; echo;
        $(Q)echo; echo "\tSoftware tests subdirs"; echo;
        $(Q)echo $(SW_TESTS_SUBDIRS); echo
        $(Q)echo $(SW_TESTS_SUBDIRS); echo
 
 
Line 224... Line 236...
clean-all: clean
clean-all: clean
        $(Q)for testssubdir in $(SW_TESTS_SUBDIRS); do $(MAKE) -C $$testssubdir clean; done
        $(Q)for testssubdir in $(SW_TESTS_SUBDIRS); do $(MAKE) -C $$testssubdir clean; done
        $(Q)for dir in $(SW_DRIVER_PATHS); do $(MAKE) -C $$dir clean; done
        $(Q)for dir in $(SW_DRIVER_PATHS); do $(MAKE) -C $$dir clean; done
        $(Q)for dir in `ls $(SW_APPS_PATH)`; do $(MAKE) -C $(SW_ROOT)/apps/$$dir clean; done
        $(Q)for dir in `ls $(SW_APPS_PATH)`; do $(MAKE) -C $(SW_ROOT)/apps/$$dir clean; done
        $(Q)for dir in `ls $(SW_APPS_PATH)`; do $(MAKE) -C $(SW_ROOT)/apps/$$dir clean; done
        $(Q)for dir in `ls $(SW_APPS_PATH)`; do $(MAKE) -C $(SW_ROOT)/apps/$$dir clean; done
 
        $(Q)$(MAKE) -C $(SW_ROOT)/lib clean
        $(Q)rm -f $(PROCESSED_DEFINES)
        $(Q)rm -f $(PROCESSED_DEFINES)

powered by: WebSVN 2.1.0

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