]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/EfiCompress/makefile
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / EfiCompress / makefile
1 #/*++
2 #
3 # Copyright (c) 2006 - 2007, Intel Corporation
4 # All rights reserved. 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
8 #
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.
11 #
12 # Module Name:
13 #
14 # makefile
15 #
16 # Abstract:
17 #
18 # This file is used to build the EFI utility.
19 #
20 #--*/
21
22 #
23 # Do this if you want to compile from this directory
24 #
25 !IFNDEF TOOLCHAIN
26 TOOLCHAIN = TOOLCHAIN_MSVC
27 !ENDIF
28
29 !INCLUDE $(BUILD_DIR)\PlatformTools.env
30
31 #
32 # Define some macros we use here. Should get rid of them someday and
33 # get rid of the extra level of indirection.
34 #
35 COMMON_SOURCE = $(EDK_TOOLS_COMMON)
36
37
38 #
39 # Common information
40 #
41
42 INC=$(INC)
43
44 #
45 # Target specific information
46 #
47
48 TARGET_NAME=EfiCompress
49 TARGET_SOURCE_DIR = $(EDK_TOOLS_SOURCE)\$(TARGET_NAME)
50
51 TARGET_EXE = $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).exe
52
53 TARGET_EXE_SOURCE = "$(TARGET_SOURCE_DIR)\EfiCompressMain.c"
54 TARGET_EXE_INCLUDE = "$(COMMON_SOURCE)\Compress.h"
55 TARGET_EXE_LIBS = "$(EDK_TOOLS_OUTPUT)\Common.lib"
56
57 #
58 # Build targets
59 #
60
61 all: $(TARGET_EXE)
62
63 #
64 # Build EXE
65 #
66
67 $(EDK_TOOLS_OUTPUT)\EfiCompressMain.obj: $(TARGET_EXE_SOURCE) $(TARGET_EXE_INCLUDE)
68 $(CC) $(C_FLAGS) $(INC) $(TARGET_EXE_SOURCE) /Fo$(EDK_TOOLS_OUTPUT)\EfiCompressMain.obj
69
70 #
71 # Add Binary Build description for this tool.
72 #
73
74 !IF (("$(EFI_BINARY_TOOLS)" == "YES") && EXIST($(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe))
75 $(TARGET_EXE): $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe
76 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe $(TARGET_EXE) /Y
77 if exist $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb \
78 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb /Y
79 !ELSE
80 $(TARGET_EXE): $(EDK_TOOLS_OUTPUT)\EfiCompressMain.obj $(TARGET_EXE_LIBS)
81 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(EDK_TOOLS_OUTPUT)\EfiCompressMain.obj $(TARGET_EXE_LIBS)
82 !IF ("$(EFI_BINARY_BUILD)" == "YES")
83 if not exist $(EFI_PLATFORM_BIN)\Tools mkdir $(EFI_PLATFORM_BIN)\Tools
84 if exist $(TARGET_EXE) copy $(TARGET_EXE) $(EFI_PLATFORM_BIN)\tools\$(TARGET_NAME).exe /Y
85 if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb \
86 copy $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb /Y
87 !ENDIF
88 !ENDIF
89
90 clean:
91 @if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Main.* del /q $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Main.* > NUL