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

      2 # Makefile

      3 #

      4 # Copyright (c) 2007 - 2014, 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 EDK_TOOLS_PATH
     15 !ERROR "Please set your EDK_TOOLS_PATH!"
     16 !ENDIF
     17 
     18 !IFNDEF BASE_TOOLS_PATH
     19 !ERROR "BASE_TOOLS_PATH is not set! Please run build_tools.bat at first!"
     20 !ENDIF
     21 
     22 !IFNDEF ARCH
     23 ARCH = IA32
     24 !ENDIF
     25 
     26 MAKE        = nmake -nologo
     27 
     28 # DOS del command doesn't support ":\\" in the file path, such as j:\\BaseTools. Convert ":\\" to ":\"

     29 BASE_TOOLS_PATH = $(BASE_TOOLS_PATH::\\=:\)
     30 EDK_TOOLS_PATH  = $(EDK_TOOLS_PATH::\\=:\)
     31 
     32 SOURCE_PATH = $(BASE_TOOLS_PATH)\Source\C
     33 BIN_PATH    = $(BASE_TOOLS_PATH)\Bin
     34 LIB_PATH    = $(BASE_TOOLS_PATH)\Lib
     35 
     36 SYS_BIN_PATH=$(EDK_TOOLS_PATH)\Bin
     37 SYS_LIB_PATH=$(EDK_TOOLS_PATH)\Lib
     38 
     39 !IF "$(ARCH)"=="IA32"
     40 ARCH_INCLUDE = $(SOURCE_PATH)\Include\Ia32
     41 BIN_PATH     = $(BASE_TOOLS_PATH)\Bin\Win32
     42 LIB_PATH     = $(BASE_TOOLS_PATH)\Lib\Win32
     43 SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32
     44 SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32
     45 !ENDIF
     46 
     47 !IF "$(ARCH)"=="X64"
     48 ARCH_INCLUDE = $(SOURCE_PATH)\Include\X64
     49 BIN_PATH     = $(BASE_TOOLS_PATH)\Bin\Win64
     50 LIB_PATH     = $(BASE_TOOLS_PATH)\Lib\Win64
     51 SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64
     52 SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64
     53 !ENDIF
     54 
     55 CC = cl.exe
     56 CXX = cl.exe
     57 AS = ml.exe
     58 AR = lib.exe
     59 LD = link.exe
     60 LINKER = $(LD)
     61 
     62 INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common $(INC)
     63 
     64 CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 
     65 CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 
     66 
     67