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