]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - psdk_cust/pdk_k2g_1_0_1_0_eng/packages/ti/board/diag/buzzer/makefile
PASDK-258:Update PDK eng to 1.0.1.1. Using build number to differentiate PDK eng...
[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_0_eng / packages / ti / board / diag / buzzer / makefile
1 # Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
2 #
3 #
4 #  Redistribution and use in source and binary forms, with or without
5 #  modification, are permitted provided that the following conditions
6 #  are met:
7 #
8 #    Redistributions of source code must retain the above copyright
9 #    notice, this list of conditions and the following disclaimer.
10 #
11 #    Redistributions in binary form must reproduce the above copyright
12 #    notice, this list of conditions and the following disclaimer in the
13 #    documentation and/or other materials provided with the
14 #    distribution.
15 #
16 #    Neither the name of Texas Instruments Incorporated nor the names of
17 #    its contributors may be used to endorse or promote products derived
18 #    from this software without specific prior written permission.
19 #
20 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 export USEDYNAMIC_LIB ?= "no"
34 # ROOT Directory
35 ifndef PDK_INSTALL_PATH
36 export ROOTDIR := ../..
37 else
38 export ROOTDIR = $(PDK_INSTALL_PATH)
39 endif
41 # PDK Board Library
42 ifndef PDK_DIAG_DIR
43 export PDK_DIAG_DIR = $(ROOTDIR)/ti/board
44 endif
46 # Device based on board
47 ifeq ($(BOARD), evmAM437x)
48 export DEVICE=AM437x
49 endif
51 # Common Macros used in make
52 ifndef RM
53 export RM = rm -f
54 endif
56 ifndef CP
57 export CP = cp -p
58 endif
60 export MKDIR = mkdir -p
62 ifndef RMDIR
63 export RMDIR = rm -rf
64 endif
66 ifndef SED
67 export SED = sed
68 endif
70 ifndef MAKE
71 export MAKE = make
72 endif
74 # PHONY Targets
75 .PHONY: all build_example clean
77 # all rule
78 all: build_example
80 # Check for board variable to exist
81 check-board:
82 ifndef BOARD
83         @echo BOARD NOT DEFINED, exiting...
84         @exit 1
85 else
86         @if [ ! -d "./build/$(BOARD)" ]; then echo $(DIAGTEST) not supported for $(BOARD); exit 1; fi
87 endif
88         
89 # Check for target variable to exist
90 check-target:
91 ifndef TARGET
92         @echo TARGET NOT DEFINED, exiting...
93         @exit 1
94 else
95         @if [ ! -d "./build/$(BOARD)/$(TARGET)" ]; then echo $(DIAGTEST) not supported for target $(TARGET) using board $(BOARD); exit 1; fi
96 endif
98 build_example: check-board check-target
99         $(MAKE) -f ./build/$(BOARD)/$(TARGET)/makefile 
101 clean: check-board check-target
102         $(MAKE) -f ./build/$(BOARD)/$(TARGET)/makefile clean