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 StrGather 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 TARGET_NAME = StrGather 42 TARGET_SRC_DIR = $(EDK_TOOLS_SOURCE)\$(TARGET_NAME) 43 TARGET_EXE = $(EDK_TOOLS_OUTPUT)\StrGather.exe 44 45 # 46 # Build targets 47 # 48 49 all: $(TARGET_EXE) 50 51 52 LIBS = "$(EDK_TOOLS_OUTPUT)\Common.lib" 53 54 OBJECTS = $(EDK_TOOLS_OUTPUT)\StrGather.obj \ 55 $(EDK_TOOLS_OUTPUT)\StringDB.obj 56 57 INC_DEPS = $(TARGET_SRC_DIR)\StrGather.h $(TARGET_SRC_DIR)\StringDB.h 58 59 C_FLAGS = $(C_FLAGS) /W4 60 61 # 62 # Compile each source file 63 # 64 $(EDK_TOOLS_OUTPUT)\StrGather.obj : $(TARGET_SRC_DIR)\StrGather.c $(INC_DEPS) 65 $(CC) $(C_FLAGS) $(INC_PATHS) $(TARGET_SRC_DIR)\StrGather.c /Fo$@ 66 67 $(EDK_TOOLS_OUTPUT)\StringDB.obj : $(TARGET_SRC_DIR)\StringDB.c $(INC_DEPS) 68 $(CC) $(C_FLAGS) $(INC_PATHS) $(TARGET_SRC_DIR)\StringDB.c /Fo$@ 69 70 # 71 # Add Binary Build description for this tools. 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) : $(OBJECTS) $(LIBS) 81 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS) 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 92