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