]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Tools/Source/CustomizedCompress/makefile
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / CustomizedCompress / makefile
1 #/*++
2 #
3 # Copyright (c) 2004 - 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: makefile
13 #
14 # Abstract:
15 #
16 # This file is used to build the EFI utility.
17 #
18 #--*/
19
20 #
21 # Do this if you want to compile from this directory
22 #
23 !IFNDEF TOOLCHAIN
24 TOOLCHAIN = TOOLCHAIN_MSVC
25 !ENDIF
26
27 !INCLUDE $(BUILD_DIR)\PlatformTools.env
28
29 #
30 # Define some macros we use here. Should get rid of them someday and
31 # get rid of the extra level of indirection.
32 #
33 TARGET_NAME = CustomizedCompress
34 TARGET_SOURCE_DIR = $(EDK_TOOLS_SOURCE)\$(TARGET_NAME)
35 COMMON_SOURCE = $(EDK_TOOLS_COMMON)
36
37 #
38 # Common information
39 #
40
41 TARGET_LIB = $(EDK_TOOLS_OUTPUT)\CustomizedCompress.lib
42
43 OBJECTS = "$(EDK_TOOLS_OUTPUT)\CustomizedCompress.obj"
44
45 #
46 # Build targets
47 #
48
49 all: $(TARGET_LIB)
50
51 #
52 # Object targets
53 #
54
55 "$(EDK_TOOLS_OUTPUT)\CustomizedCompress.obj": "$(TARGET_SOURCE_DIR)\CustomizedCompress.c" $(EDK_SOURCE)\Foundation\Include\EfiCommon.h
56 $(CC) $(C_FLAGS) "$(TARGET_SOURCE_DIR)\CustomizedCompress.c" /Fo"$(EDK_TOOLS_OUTPUT)\CustomizedCompress.obj"
57
58 #
59 # Build LIB
60 #
61
62 #
63 # Add Binary Build description for this lib.
64 #
65
66 !IF (("$(EFI_BINARY_TOOLS)" == "YES") && EXIST($(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).lib))
67 $(TARGET_LIB): $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).lib
68 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).lib $(TARGET_LIB) /Y
69 if exist $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME)Obj.pdb \
70 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME)Obj.pdb $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj.pdb /Y
71 !ELSE
72 $(TARGET_LIB): $(OBJECTS)
73 $(LIB_EXE) $(LIB_FLAGS) $(OBJECTS) /OUT:$(TARGET_LIB)
74 if not exist $(EFI_PLATFORM_BIN)\Tools mkdir $(EFI_PLATFORM_BIN)\Tools
75 if exist $(TARGET_LIB) copy $(TARGET_LIB) $(EFI_PLATFORM_BIN)\tools\$(TARGET_NAME).lib /Y
76 if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj.pdb \
77 copy $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj.pdb $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME)Obj.pdb /Y
78 !ENDIF
79
80 clean:
81 @if exist $(EDK_TOOLS_OUTPUT)\CustomizedCompress.* del /q $(EDK_TOOLS_OUTPUT)\CustomizedCompress.* > NUL
82 @if exist $(TARGET_LIB) del $(TARGET_LIB)