Commit | Line | Data |
---|---|---|
c69f724d | 1 | ## @file\r |
2 | # Windows makefile for Python tools build.\r | |
3 | #\r | |
40d841f6 LG |
4 | # Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r |
5 | # This program and the accompanying materials\r | |
c69f724d | 6 | # are licensed and made available under the terms and conditions of the BSD License\r |
7 | # which accompanies this distribution. The full text of the license may be found at\r | |
8 | # http://opensource.org/licenses/bsd-license.php\r | |
9 | #\r | |
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | #\r | |
13 | \r | |
14 | !IFNDEF PYTHON_FREEZER_PATH\r | |
15 | !ERROR PYTHON_FREEZER_PATH must be defined!\r | |
16 | !ENDIF\r | |
17 | \r | |
4afd3d04 LG |
18 | !IF EXIST ($(PYTHON_FREEZER_PATH)\cxfreeze)\r |
19 | # Using cx_Freeze 4.2.3 with Python 2.7.2\r | |
20 | FREEZE=$(PYTHON_FREEZER_PATH)\cxfreeze\r | |
21 | !ELSE\r | |
22 | # Using cx_Freeze 3.0.3 with Python 2.5.4\r | |
c69f724d | 23 | FREEZE=$(PYTHON_FREEZER_PATH)\FreezePython.exe\r |
4afd3d04 | 24 | !ENDIF\r |
c69f724d | 25 | \r |
4234283c | 26 | MODULES=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8,encodings.utf_16_le,encodings.latin_1,encodings.ascii\r |
c69f724d | 27 | \r |
28 | BIN_DIR=$(EDK_TOOLS_PATH)\Bin\Win32\r | |
29 | \r | |
64b2609f | 30 | APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BIN_DIR)\TargetTool.exe $(BIN_DIR)\GenDepex.exe $(BIN_DIR)\GenPatchPcdTable.exe $(BIN_DIR)\PatchPcdValue.exe $(BIN_DIR)\BPDG.exe $(BIN_DIR)\UPT.exe\r |
30fdf114 LG |
31 | \r |
32 | COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \\r | |
33 | $(BASE_TOOLS_PATH)\Source\Python\Common\Database.py \\r | |
34 | $(BASE_TOOLS_PATH)\Source\Python\Common\DataType.py \\r | |
35 | $(BASE_TOOLS_PATH)\Source\Python\Common\DecClassObject.py \\r | |
30fdf114 LG |
36 | $(BASE_TOOLS_PATH)\Source\Python\Common\Dictionary.py \\r |
37 | $(BASE_TOOLS_PATH)\Source\Python\Common\DscClassObject.py \\r | |
38 | $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspace.py \\r | |
39 | $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspaceBuild.py \\r | |
40 | $(BASE_TOOLS_PATH)\Source\Python\Common\EdkLogger.py \\r | |
41 | $(BASE_TOOLS_PATH)\Source\Python\Common\FdfClassObject.py \\r | |
42 | $(BASE_TOOLS_PATH)\Source\Python\Common\FdfParserLite.py \\r | |
43 | $(BASE_TOOLS_PATH)\Source\Python\Common\GlobalData.py \\r | |
44 | $(BASE_TOOLS_PATH)\Source\Python\Common\Identification.py \\r | |
45 | $(BASE_TOOLS_PATH)\Source\Python\Common\InfClassObject.py \\r | |
30fdf114 LG |
46 | $(BASE_TOOLS_PATH)\Source\Python\Common\MigrationUtilities.py \\r |
47 | $(BASE_TOOLS_PATH)\Source\Python\Common\Misc.py \\r | |
48 | $(BASE_TOOLS_PATH)\Source\Python\Common\Parsing.py \\r | |
49 | $(BASE_TOOLS_PATH)\Source\Python\Common\String.py \\r | |
50 | $(BASE_TOOLS_PATH)\Source\Python\Common\TargetTxtClassObject.py \\r | |
51 | $(BASE_TOOLS_PATH)\Source\Python\Common\ToolDefClassObject.py \\r | |
e56468c0 | 52 | $(BASE_TOOLS_PATH)\Source\Python\Common\VpdInfoFile.py \\r |
30fdf114 | 53 | $(BASE_TOOLS_PATH)\Source\Python\Common\__init__.py \\r |
b36d134f | 54 | $(BASE_TOOLS_PATH)\Source\Python\Common\BuildVersion.py \\r |
30fdf114 LG |
55 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\BuildClassObject.py \\r |
56 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\MetaDataTable.py \\r | |
57 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\MetaFileParser.py \\r | |
58 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\MetaFileTable.py \\r | |
59 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\WorkspaceDatabase.py \\r | |
60 | $(BASE_TOOLS_PATH)\Source\Python\Workspace\__init__.py \\r | |
61 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\AutoGen.py \\r | |
62 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\BuildEngine.py \\r | |
63 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\GenC.py \\r | |
64 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\GenDepex.py \\r | |
65 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\GenMake.py \\r | |
66 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\StrGather.py \\r | |
67 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\UniClassObject.py \\r | |
e56468c0 | 68 | $(BASE_TOOLS_PATH)\Source\Python\Autogen\__init__.py\r |
30fdf114 | 69 | \r |
2bcc713e | 70 | UPT_BUILDVERSION_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\UPT\BuildVersion.py\r |
30fdf114 | 71 | \r |
c69f724d | 72 | all: SetPythonPath $(APPLICATIONS)\r |
73 | \r | |
74 | SetPythonPath:\r | |
75 | set PYTHONPATH=$(BASE_TOOLS_PATH)\Source\Python\r | |
76 | \r | |
77 | $(BIN_DIR)\build.exe: $(BASE_TOOLS_PATH)\Source\Python\build\build.py $(COMMON_PYTHON)\r | |
78 | @pushd . & @cd build & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) build.py & @popd\r | |
79 | \r | |
80 | $(BIN_DIR)\GenFds.exe: $(BASE_TOOLS_PATH)\Source\Python\GenFds\GenFds.py $(COMMON_PYTHON)\r | |
81 | @pushd . & @cd GenFds & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) GenFds.py & @popd\r | |
82 | \r | |
83 | $(BIN_DIR)\Trim.exe: $(BASE_TOOLS_PATH)\Source\Python\Trim\Trim.py $(COMMON_PYTHON)\r | |
84 | @pushd . & @cd Trim & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) Trim.py & @popd\r | |
85 | \r | |
30fdf114 LG |
86 | $(BIN_DIR)\GenDepex.exe: $(BASE_TOOLS_PATH)\Source\Python\AutoGen\GenDepex.py $(COMMON_PYTHON)\r |
87 | @pushd . & @cd AutoGen & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) GenDepex.py & @popd\r | |
88 | \r | |
89 | $(BIN_DIR)\TargetTool.exe: $(BASE_TOOLS_PATH)\Source\Python\TargetTool\TargetTool.py $(COMMON_PYTHON)\r | |
90 | @pushd . & @cd TargetTool & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) TargetTool.py & @popd\r | |
91 | \r | |
c69f724d | 92 | $(BIN_DIR)\GenPatchPcdTable.exe: $(BASE_TOOLS_PATH)\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py $(COMMON_PYTHON)\r |
93 | @pushd . & @cd GenPatchPcdTable & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) GenPatchPcdTable.py & @popd\r | |
52302d4d | 94 | \r |
c69f724d | 95 | $(BIN_DIR)\PatchPcdValue.exe: $(BASE_TOOLS_PATH)\Source\Python\PatchPcdValue\PatchPcdValue.py $(COMMON_PYTHON)\r |
96 | @pushd . & @cd PatchPcdValue & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) PatchPcdValue.py & @popd\r | |
52302d4d | 97 | \r |
e56468c0 | 98 | $(BIN_DIR)\BPDG.exe: $(BASE_TOOLS_PATH)\Source\Python\BPDG\BPDG.py $(COMMON_PYTHON)\r |
99 | @pushd . & @cd BPDG & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) BPDG.py & @popd\r | |
4234283c | 100 | \r |
2bcc713e | 101 | $(BIN_DIR)\UPT.exe: $(BASE_TOOLS_PATH)\Source\Python\UPT\UPT.py $(UPT_BUILDVERSION_PYTHON)\r |
4234283c LG |
102 | @pushd . & @cd UPT & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) UPT.py & @popd\r |
103 | \r | |
30fdf114 | 104 | clean:\r |
c69f724d | 105 | cleanall: \r |
106 | @del /f /q $(BIN_DIR)\*.pyd $(BIN_DIR)\*.dll\r | |
107 | @for %%i in ($(APPLICATIONS)) do @del /f /q %%i\r | |
108 | \r |