Home | History | Annotate | Download | only in UPT
      1 ## @file

      2 # Windows makefile for UPT tools build.

      3 #

      4 # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>

      5 # This program and the accompanying materials

      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,encodings.ascii
     21 
     22 BIN_DIR = .\Bin
     23 SOURCES_PATH = .
     24 
     25 APPLICATIONS=$(BIN_DIR)\UPT.exe
     26 
     27 UPT_BUILDVERSION_PYTHON=$(SOURCES_PATH)\BuildVersion.py
     28 
     29 all: SetPythonPath $(APPLICATIONS)
     30 
     31 SetPythonPath:
     32   set PYTHONPATH= $(SOURCES_PATH)
     33 
     34 $(BIN_DIR)\UPT.exe: $(SOURCES_PATH)\UPT.py $(UPT_BUILDVERSION_PYTHON)
     35   @pushd . & @cd build & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) UPT.py & @popd
     36   @pushd . & @copy .\Dll\sqlite3.dll .\Bin\Sqlite3.dll & @popd 
     37 clean:
     38 cleanall:  
     39   @del /f /q $(BIN_DIR)\*.pyd $(BIN_DIR)\*.dll
     40   @for %%i in ($(APPLICATIONS)) do @del /f /q %%i
     41 
     42