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: 13 # 14 # Makefile 15 # 16 # Abstract: 17 # 18 # makefile for building the GUID check utility. 19 # 20 #--*/ 21 22 # 23 # Make sure environmental variable EDK_SOURCE is set 24 # 25 !IFNDEF EDK_SOURCE 26 !ERROR EDK_SOURCE environmental variable not set 27 !ENDIF 28 29 # 30 # Do this if you want to compile from this directory 31 # 32 !IFNDEF TOOLCHAIN 33 TOOLCHAIN = TOOLCHAIN_MSVC 34 !ENDIF 35 36 !INCLUDE $(BUILD_DIR)\PlatformTools.env 37 38 # 39 # Target specific information 40 # 41 42 TARGET_NAME = GuidChk 43 TARGET_SRC_DIR = $(EDK_TOOLS_SOURCE)\$(TARGET_NAME) 44 TARGET_EXE = $(EDK_TOOLS_OUTPUT)\GuidChk.exe 45 46 #LIBS = $(LIBS) "$(EDK_TOOLS_OUTPUT)\Common.lib" 47 48 # 49 # Build targets 50 # 51 all: $(TARGET_EXE) 52 53 INC_DEPS = $(TARGET_SRC_DIR)\FileSearch.h $(INC_DEPS) 54 #INC_DEPS = $(TARGET_SRC_DIR)\CommonUtils.h $(INC_DEPS) 55 #INC_DEPS = $(TARGET_SRC_DIR)\UtilsMsgs.h $(INC_DEPS) 56 57 OBJECTS = $(EDK_TOOLS_OUTPUT)\GuidChk.obj \ 58 $(EDK_TOOLS_OUTPUT)\FileSearch.obj \ 59 $(EDK_TOOLS_OUTPUT)\GuidList.obj \ 60 $(EDK_TOOLS_OUTPUT)\UtilsMsgs.obj 61 # 62 # Compile each source file 63 # 64 $(EDK_TOOLS_OUTPUT)\GuidChk.obj : $(TARGET_SRC_DIR)\GuidChk.c $(INC_DEPS) 65 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\GuidChk.c /Fo$@ 66 67 $(EDK_TOOLS_OUTPUT)\FileSearch.obj : $(TARGET_SRC_DIR)\FileSearch.c $(INC_DEPS) 68 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\FileSearch.c /Fo$@ 69 70 $(EDK_TOOLS_OUTPUT)\GuidList.obj : $(TARGET_SRC_DIR)\GuidList.c $(INC_DEPS) 71 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\GuidList.c /Fo$@ 72 73 $(EDK_TOOLS_OUTPUT)\UtilsMsgs.obj : $(TARGET_SRC_DIR)\UtilsMsgs.c $(INC_DEPS) 74 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\UtilsMsgs.c /Fo$@ 75 76 # 77 # Add Binary Build description for this tool. 78 # 79 80 !IF (("$(EFI_BINARY_TOOLS)" == "YES") && EXIST($(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe)) 81 $(TARGET_EXE): $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe 82 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe $(TARGET_EXE) /Y 83 if exist $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb \ 84 copy $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb /Y 85 !ELSE 86 $(TARGET_EXE) : $(OBJECTS) 87 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS) 88 !IF ("$(EFI_BINARY_BUILD)" == "YES") 89 if not exist $(EFI_PLATFORM_BIN)\Tools mkdir $(EFI_PLATFORM_BIN)\Tools 90 if exist $(TARGET_EXE) copy $(TARGET_EXE) $(EFI_PLATFORM_BIN)\tools\$(TARGET_NAME).exe /Y 91 if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb \ 92 copy $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb /Y 93 !ENDIF 94 !ENDIF 95 96 clean: 97 @if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).* del $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).* > NUL 98 @if exist $(EDK_TOOLS_OUTPUT)\FileSearch.* del $(EDK_TOOLS_OUTPUT)\FileSearch.* > NUL 99