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 23ARCH = IA32 24!ENDIF 25 26MAKE = nmake -nologo 27 28# DOS del command doesn't support ":\\" in the file path, such as j:\\BaseTools. Convert ":\\" to ":\" 29BASE_TOOLS_PATH = $(BASE_TOOLS_PATH::\\=:\) 30EDK_TOOLS_PATH = $(EDK_TOOLS_PATH::\\=:\) 31 32SOURCE_PATH = $(BASE_TOOLS_PATH)\Source\C 33BIN_PATH = $(BASE_TOOLS_PATH)\Bin 34LIB_PATH = $(BASE_TOOLS_PATH)\Lib 35 36SYS_BIN_PATH=$(EDK_TOOLS_PATH)\Bin 37SYS_LIB_PATH=$(EDK_TOOLS_PATH)\Lib 38 39!IF "$(ARCH)"=="IA32" 40ARCH_INCLUDE = $(SOURCE_PATH)\Include\Ia32 41BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win32 42LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win32 43SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32 44SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32 45!ENDIF 46 47!IF "$(ARCH)"=="X64" 48ARCH_INCLUDE = $(SOURCE_PATH)\Include\X64 49BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64 50LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64 51SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64 52SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64 53!ENDIF 54 55CC = cl.exe 56CXX = cl.exe 57AS = ml.exe 58AR = lib.exe 59LD = link.exe 60LINKER = $(LD) 61 62INC = -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common $(INC) 63 64CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 65CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 66 67