3 # Copyright (c) 2001 Intel Corporation. All rights reserved.
5 # This software and associated documentation (if any) is furnished under
6 # a license and may only be used or copied in accordance with the terms
7 # of the license. Except as permitted by such license, no part of this
8 # software or documentation may be reproduced, stored in a retrieval
9 # system, or transmitted in any form or by any means without the express
10 # written consent of Intel Corporation.
18 # makefile for building the PeiRebase utility.
25 # Make sure environmental variable EFI_SOURCE is set
28 !ERROR EFI_SOURCE environmental variable not set
32 # Do this if you want to compile from this directory
35 TOOLCHAIN = TOOLCHAIN_MSVC
38 !INCLUDE PlatformTools.env
41 # Target specific information
44 TARGET_NAME = PeiRebase
45 TARGET_SRC_DIR = $(TIANO_TOOLS_SOURCE)\$(TARGET_NAME)
46 TARGET_EXE = $(TIANO_TOOLS_OUTPUT)\PeiRebase.exe
47 TARGET_EXE_LIBS = $(TIANO_TOOLS_OUTPUT)\Common.lib
55 OBJECTS = $(TIANO_TOOLS_OUTPUT)\PeiRebase.obj
58 # Compile each source file
60 $(TIANO_TOOLS_OUTPUT)\PeiRebase.obj : $(TARGET_SRC_DIR)\PeiRebaseExe.c $(INC_DEPS) $(TARGET_EXE_LIBS)
61 $(CC) $(C_FLAGS) $(TARGET_SRC_DIR)\PeiRebaseExe.c /Fo$@
64 # Link the object files together
66 $(TARGET_EXE) : $(OBJECTS) $(TARGET_EXE_LIBS)
68 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS) $(TARGET_EXE_LIBS)
71 @if exist $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* del $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* > NUL