5ba36075495d2a2d16cdab865b78c8fcd78862a7
[mirror_edk2.git] / Tools / Source / TianoTools / EfiRom / Makefile
1 #/*++
2 #
3 # Copyright (c) 2001 Intel Corporation. All rights reserved.
4 #
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.
11 #
12 # Module Name:
13 #
14 # makefile
15 #
16 # Abstract:
17 #
18 # makefile for building the EfiRom utility.
19 #
20 # Revision History
21 #
22 #--*/
23
24 #
25 # Make sure environmental variable EFI_SOURCE is set
26 #
27 !IFNDEF EFI_SOURCE
28 !ERROR EFI_SOURCE environmental variable not set
29 !ENDIF
30
31 #
32 # Define the toolchain which is used to set build options and toolchain paths
33 #
34 TOOLCHAIN = TOOLCHAIN_MSVC
35
36 !INCLUDE PlatformTools.env
37
38 #
39 # Target specific information
40 #
41
42 TARGET_NAME = EfiRom
43 TARGET_SRC_DIR = $(TIANO_TOOLS_SOURCE)\$(TARGET_NAME)
44 TARGET_EXE = $(TIANO_TOOLS_OUTPUT)\EfiRom.exe
45
46 #
47 # Build targets
48 #
49
50 all: $(TARGET_EXE)
51
52 OBJECTS = $(TIANO_TOOLS_OUTPUT)\EfiRom.obj \
53 $(TIANO_TOOLS_OUTPUT)\EfiCompress.obj
54
55 #
56 # Build the EXE by compiling the source files, then linking the resultant
57 # object files together.
58 #
59
60 $(TIANO_TOOLS_OUTPUT)\EfiRom.obj : $(TARGET_SRC_DIR)\EfiRom.c
61 $(CC) $(C_FLAGS) $(TARGET_SRC_DIR)\EfiRom.c /Fo$@
62
63 $(TIANO_TOOLS_OUTPUT)\EfiCompress.obj : $(EDK_TOOLS_SOURCE)\Common\EfiCompress.c
64 $(CC) $(C_FLAGS) $(EDK_TOOLS_SOURCE)\Common\EfiCompress.c /Fo$@
65
66 $(TARGET_EXE): $(OBJECTS) $(TARGET_EXE_LIBS)
67 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS)
68
69 clean:
70 @if exist $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* del $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* > NUL