## ## Copyright (c) 2015, Texas Instruments Incorporated ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## ## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## ## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. ## ## * Neither the name of Texas Instruments Incorporated nor the names of ## its contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ## THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; ## OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR ## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## # Path to C6000 compiler tools ifeq ($(CGTROOT),) $(call error,ERROR - CGTROOT NOT DEFINED) endif ifeq ($(XDC_DIR),) $(call error,ERROR - XDC_DIR NOT DEFINED) endif ifeq ($(LINALG_BASE_DIR),) LINALG_BASE_DIR := $(shell pwd) endif ifeq ($(SRC_PATH),) SRC_PATH = $(LINALG_BASE_DIR)/src/ti/linalg endif ifeq ($(LIBOS),LIB_RTOS) BUILD_MESSAGE = "building linalg for TI-RTOS" MAKE_TARGET = DSPlibs CLEAN_TARGET = cleanDSPlibs EXAMPLES = examples/dsponly else ifeq ($(LIBOS),LIB_OPENCL) BUILD_MESSAGE = "building linalg for TI-OpenCL" MAKE_TARGET = ARMplusDSP CLEAN_TARGET = cleanARMplusDSP EXAMPLES = examples/arm+dsp else $(call error, ERROR - LIBOS NOT DEFINED. Must specify one of: LIBOS=LIB_RTOS, or LIBOS=LIB_OPENCL) endif XDCPATH = $(PDK_DIR)/packages;$(OMP_DIR)/packages;$(BIOS_DIR)/packages;$(IPC_DIR)/packages;$(FC_DIR)/packages;$(XDAIS_DIR)/packages;$(EDMA3_DIR)/packages; XDC=$(XDC_DIR)/xdc XS=$(XDC_DIR)/xs XDCPKG=$(XDC_DIR)/bin/xdcpkg PACKAGE_NAME = linalg_1_2_0_0 all: package .lib: @echo $(BUILD_MESSAGE) cd $(LINALG_BASE_DIR)/src/ti/linalg; \ make $(MAKE_TARGET) MEM_MODEL=$(MEM_MODEL) TARGET=$(TARGET) LIBOS=$(LIBOS) .platforms: @echo "making platform directories ..." $(XDC) clean --xdcpath="$(BIOS_DIR)/packages" -PR $(SRC_PATH)/platforms $(XDC) --xdcpath "$(XDCPATH)" -PR $(SRC_PATH)/platforms .eclipse: .exports @echo creating product plugin $(XDC) clean -P $(LINALG_BASE_DIR)/build/eclipse $(XDC) -P $(LINALG_BASE_DIR)/build/eclipse $(XS) --xdcpath "$(XDCPATH);$(LINALG_BASE_DIR)/build" xdc.tools.product.plugingen -p exports/$(PACKAGE_NAME) -m eclipse.Product .exports: @echo "making product directories ..." @rm -f exports/$(PACKAGE_NAME).zip @rm -rf exports/$(PACKAGE_NAME) @mkdir -p exports/$(PACKAGE_NAME) @mkdir -p exports/$(PACKAGE_NAME)/examples @mkdir -p exports/$(PACKAGE_NAME)/packages @mkdir -p exports/$(PACKAGE_NAME)/packages/ti/linalg @cp -R $(LINALG_BASE_DIR)/src/ti/linalg/* exports/$(PACKAGE_NAME)/packages/ti/linalg .docs: @echo "generating Doxygen document" cd $(LINALG_BASE_DIR)/src/ti/linalg; doxygen ./docs/doxygen/doxycfg.txt #.product: .libs_c6678 .exports .docs .platforms .examples package: .exports .lib .docs .platforms .eclipse @echo "copying files ..." @cp -R $(LINALG_BASE_DIR)/src/ti/linalg/lib exports/$(PACKAGE_NAME)/packages/ti/linalg @cp $(LINALG_BASE_DIR)/src/ti/linalg/include/* exports/$(PACKAGE_NAME)/packages/ti/linalg @cp -R $(LINALG_BASE_DIR)/src/ti/linalg/docs exports/$(PACKAGE_NAME) @ln -s doxygen/html/index.html exports/$(PACKAGE_NAME)/docs/linalg_user_guide.html @cp -R $(LINALG_BASE_DIR)/$(EXAMPLES)/* exports/$(PACKAGE_NAME)/examples/ @cp -R $(LINALG_BASE_DIR)/examples/readme.txt exports/$(PACKAGE_NAME)/examples/ @echo "archive files to tar ball ..." @cd exports; zip -q -r $(PACKAGE_NAME).zip $(PACKAGE_NAME)