Warning, file /sdk/cutehmi/Makefile.toolchain was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 # Copyright (c) 2018, Michal Policht. This file is dually licensed under terms
0002 # of either WTFPL or BEER-WARE LICENSE. You may obtain the copy of WTFPL or
0003 # BEER-WARE LICENSE by googling, binging, yahooing or downloading it from pirate
0004 # bay. NO WARRANTY.
0005 
0006 # This makefile defines variables for required tools and commands used by
0007 # various targets.
0008 
0009 # Modify PATH variable to prevent interference with other tools/libraries!
0010 
0011 C_DIR := $(patsubst %/,%,$(realpath C:/))
0012 
0013 # Target machine triplet.
0014 TARGET_MACHINE := $(shell $(CC) -dumpmachine)
0015 
0016 # Build machine triplet.
0017 BUILD_MACHINE := $(TARGET_MACHINE)
0018 
0019 # Host machine triplet.
0020 HOST_MACHINE := $(TARGET_MACHINE)
0021 
0022 ifeq "$(OS)" "Windows_NT"
0023   NATIVE_PATH_SEPARATOR := $(join \,)
0024   NATIVE_EXECUTABLE_SUFFIX := .exe
0025   # Input/Output Record Separator used by AWK.
0026   NATIVE_IORS = '\r\n'
0027 else
0028   NATIVE_PATH_SEPARATOR := /
0029   NATIVE_EXECUTABLE_SUFFIX :=
0030   # Input/Output Record Separator used by AWK.
0031   NATIVE_IORS = '\n'
0032 endif
0033 
0034 
0035 # AWK
0036 
0037 AWK = awk
0038 
0039 $(AWK):
0040 
0041 
0042 # Shell and its builtins.
0043 
0044 CD = cd
0045 SH = sh
0046 
0047 $(CD) $(SH):
0048 
0049 
0050 # Coreutils
0051 
0052 BASENAME = basename
0053 CAT = cat
0054 CUT = cut
0055 CP = cp
0056 DIRNAME = dirname
0057 ECHO = echo
0058 MKDIR = mkdir
0059 MV = mv
0060 PASTE = paste
0061 RM = rm
0062 TR = tr
0063 UNIQ = uniq
0064 SORT = sort
0065 STAT = stat
0066 TOUCH = touch
0067 
0068 $(BASENAME) $(CAT) $(CUT) $(CP) $(DIRNAME) $(ECHO) $(MKDIR) $(MV) $(PASTE) \
0069 $(RM) $(TR) $(UNIQ) $(SORT) $(STAT) $(TOUCH):
0070 
0071 
0072 # Findutils
0073 
0074 FIND = find
0075 OLDFIND = oldfind
0076 XARGS = xargs
0077 
0078 $(FIND) $(OLDFIND) $(XARGS):
0079 
0080 
0081 # Grep
0082 
0083 GREP = grep
0084 
0085 $(GREP):
0086 
0087 
0088 # Make.
0089 
0090 MAKE = make
0091 
0092 $(MAKE):
0093 
0094 # sed.
0095 
0096 SED = sed
0097 
0098 $(SED):
0099 
0100 # wget.
0101 
0102 WGET = wget
0103 
0104 $(WGET):
0105 
0106 
0107 # Qt programs are assumed to be in PATH.
0108 
0109 QDOC = qdoc
0110 QMLPLUGINDUMP = qmlplugindump
0111 
0112 $(QDOC) $(QMLPLUGINDUMP):
0113 
0114 
0115 # Doxygen.
0116 
0117 ifeq "$(OS)" "Windows_NT"
0118   DOXYGEN_DIR = $(C_DIR)/Program\ Files/doxygen
0119 else
0120   DOXYGEN_DIR = /usr
0121 endif
0122 DOXYGEN_BIN_DIR = $(DOXYGEN_DIR)/bin
0123 DOXYGEN = $(DOXYGEN_BIN_DIR)/doxygen$(NATIVE_EXECUTABLE_SUFFIX)
0124 
0125 
0126 # Python
0127 
0128 ifeq "$(OS)" "Windows_NT"
0129   PYTHON_DIR = $(C_DIR)/Python
0130   PYTHON = $(PYTHON_DIR)/python$(NATIVE_EXECUTABLE_SUFFIX)
0131 else
0132   PYTHON_DIR = /usr/bin
0133   PYTHON = $(PYTHON_DIR)/python3$(NATIVE_EXECUTABLE_SUFFIX)
0134 endif
0135 
0136 
0137 # Doxyqml.
0138 
0139 ifeq "$(OS)" "Windows_NT"
0140   DOXYQML_DIR = $(PYTHON_DIR)/Scripts
0141 else
0142   DOXYQML_DIR = /usr/bin
0143 endif
0144 DOXYQML = $(DOXYQML_DIR)/doxyqml
0145 
0146 
0147 # CMake.
0148 
0149 ifeq "$(OS)" "Windows_NT"
0150   CMAKE_DIR = $(C_DIR)/Program\ Files/CMake
0151 else
0152   CMAKE_DIR = /usr
0153 endif
0154 CMAKE_BIN_DIR = $(CMAKE_DIR)/bin
0155 CMAKE = $(CMAKE_BIN_DIR)/cmake$(NATIVE_EXECUTABLE_SUFFIX)
0156 
0157 
0158 # Git.
0159 
0160 ifeq "$(OS)" "Windows_NT"
0161   GIT_DIR = $(C_DIR)/Program\ Files/Git
0162 else
0163   GIT_DIR = /usr
0164 endif
0165 GIT_BIN_DIR = $(GIT_DIR)/bin
0166 GIT = $(GIT_BIN_DIR)/git$(NATIVE_EXECUTABLE_SUFFIX)
0167 
0168 
0169 # Subversion.
0170 
0171 ifeq "$(OS)" "Windows_NT"
0172   SVN_DIR = $(C_DIR)/Program\ Files/TortoiseSVN
0173 else
0174   SVN_DIR = /usr
0175 endif
0176 SVN_BIN_DIR = $(SVN_DIR)/bin
0177 SVN = $(SVN_BIN_DIR)/svn$(NATIVE_EXECUTABLE_SUFFIX)
0178 
0179 
0180 # Bash.
0181 BASH = bash
0182 
0183 $(BASH):
0184 
0185 
0186 # Include platform specific toolchain file.
0187 -include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))Makefile.$(BUILD_MACHINE).toolchain 
0188 
0189 # Makefile.user may override variables defined elsewhere.
0190 -include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))Makefile.user 
0191 
0192 
0193 $(DOXYGEN):
0194         $(info --------------------------------------------------------------------------------)
0195         $(info Program 'doxygen' not found!)
0196         $(info Download it from: http://www.stack.nl/~dimitri/doxygen/download.html.)
0197         $(info If 'doxygen' is installed in custom location, override DOXYGEN_DIR variable.)
0198         $(info DOXYGEN_DIR = "$(DOXYGEN_DIR)")
0199         $(error DOXYGEN = $(DOXYGEN) not found)
0200 
0201 $(PYTHON):
0202         $(info --------------------------------------------------------------------------------)
0203         $(info Can not locate Python interpreter!)
0204         $(info You can download it from: https://www.python.org/downloads/.)
0205         $(info If Python is installed, override PYTHON_DIR variable.)
0206         $(info PYTHON_DIR = "$(PYTHON_DIR)")
0207         $(error PYTHON = $(PYTHON) not found)
0208 
0209 $(DOXYQML): | $(PYTHON)
0210         $(info --------------------------------------------------------------------------------) || \
0211         $(info Program 'doxyqml' not found!)
0212         $(info You can get it from: https://github.com/agateau/doxyqml.)
0213         $(info If 'doxyqml' is installed, override DOXYQML_DIR variable.)
0214         $(info DOXYQML_DIR = "$(DOXYQML_DIR)")
0215         $(error DOXYQML = $(DOXYQML) not found)
0216 
0217 $(CMAKE):
0218         $(info --------------------------------------------------------------------------------)
0219         $(info Program 'cmake' not found!)
0220         $(info Download it from: https://cmake.org/download/.)
0221         $(info If 'cmake' is installed in custom location, override CMAKE_DIR variable.)
0222         $(info CMAKE_DIR = "$(CMAKE_DIR)")
0223         $(error CMAKE = $(CMAKE) not found)
0224 
0225 $(SVN):
0226         $(info --------------------------------------------------------------------------------)
0227         $(info Program 'subversion' not found!)
0228         $(info Windows download: https://tortoisesvn.net/downloads.html.)
0229         $(info If 'subversion' is installed in custom location, override SVN_DIR variable.)
0230         $(info SVN_DIR = "$(SVN_DIR)")
0231         $(error SVN = $(SVN) not found)