Home | History | Annotate | Download | only in CustomizedCompress
      1 #/*++

      2 #   

      3 #  Copyright (c) 2004 - 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                                            

      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 ("$(EFI_BINARY_BUILD)" == "YES")
     75   if not exist $(EFI_PLATFORM_BIN)\Tools mkdir $(EFI_PLATFORM_BIN)\Tools
     76   if exist $(TARGET_LIB) copy $(TARGET_LIB) $(EFI_PLATFORM_BIN)\tools\$(TARGET_NAME).lib /Y
     77   if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj.pdb \
     78   copy $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj.pdb $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME)Obj.pdb /Y
     79 !ENDIF
     80 !ENDIF
     81 
     82 clean:
     83   @if exist $(EDK_TOOLS_OUTPUT)\CustomizedCompress.* del /q $(EDK_TOOLS_OUTPUT)\CustomizedCompress.* > NUL
     84   @if exist $(TARGET_LIB) del $(TARGET_LIB)
     85