3 # Copyright (c) 2002 - 2007, Intel Corporation. All rights reserved.<BR>
4 # This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 # makefile for building the GenTEImage utility.
23 # Make sure environmental variable EDK_SOURCE is set
26 !ERROR EDK_SOURCE environmental variable not set
30 # Define the toolchain which is used to set build options and toolchain paths
32 TOOLCHAIN
= TOOLCHAIN_MSVC
34 !INCLUDE
$(BUILD_DIR
)\PlatformTools.env
37 # Target specific information
40 TARGET_NAME
= GenTEImage
41 TARGET_SRC_DIR
= $(EDK_TOOLS_SOURCE
)\
$(TARGET_NAME
)
42 TARGET_EXE
= $(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).exe
50 OBJECTS
= $(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).obj
52 LIBS
= $(EDK_TOOLS_OUTPUT
)\Common.lib
54 INC_DEPS
= $(EDK_SOURCE
)\Foundation\Efi\Include\EfiImage.h
57 # Build the EXE by compiling the source files, then linking the resultant
58 # object files together.
61 $(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).obj
: $(TARGET_SRC_DIR
)\
$(TARGET_NAME
).c
$(INC_DEPS
)
62 $(CC
) $(C_FLAGS
) $(TARGET_SRC_DIR
)\
$(TARGET_NAME
).c
/Fo
$@
65 # Add Binary Build description for this tools.
68 !IF
(("$(EFI_BINARY_TOOLS)" == "YES") && EXIST
($(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).exe
))
69 $(TARGET_EXE
): $(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).exe
70 copy
$(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).exe
$(TARGET_EXE
) /Y
71 if exist
$(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).pdb \
72 copy
$(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).pdb
$(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).pdb
/Y
74 $(TARGET_EXE
) : $(OBJECTS
) $(LIBS
)
75 $(LINK
) $(MSVS_LINK_LIBPATHS
) $(L_FLAGS
) $(LIBS
) /out
:$(TARGET_EXE
) $(OBJECTS
)
76 !IF
("$(EFI_BINARY_BUILD)" == "YES")
77 if not exist
$(EFI_PLATFORM_BIN
)\Tools mkdir
$(EFI_PLATFORM_BIN
)\Tools
78 if exist
$(TARGET_EXE
) copy
$(TARGET_EXE
) $(EFI_PLATFORM_BIN
)\tools\
$(TARGET_NAME
).exe
/Y
79 if exist
$(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).pdb \
80 copy
$(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).pdb
$(EFI_PLATFORM_BIN
)\Tools\
$(TARGET_NAME
).pdb
/Y
85 @if exist
$(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).
* del
$(EDK_TOOLS_OUTPUT
)\
$(TARGET_NAME
).
* > NUL