Adding Additional Tools that are needed for Platform Image creation.
[mirror_edk2.git] / Tools / Source / TianoTools / GenFdImage / Makefile
CommitLineData
d25c4bf0 1#/*++\r
2# \r
3# Copyright (c) 2001 Intel Corporation. All rights reserved.\r
4#\r
5# This software and associated documentation (if any) is furnished under \r
6# a license and may only be used or copied in accordance with the terms \r
7# of the license. Except as permitted by such license, no part of this \r
8# software or documentation may be reproduced, stored in a retrieval \r
9# system, or transmitted in any form or by any means without the express \r
10# written consent of Intel Corporation.\r
11# \r
12# Module Name: makefile\r
13# \r
14# Abstract:\r
15# \r
16# This file is used to build the EFI utility.\r
17# \r
18#--*/\r
19\r
20#\r
21# Do this if you want to compile from this directory\r
22#\r
23!IFNDEF TOOLCHAIN\r
24TOOLCHAIN = TOOLCHAIN_MSVC\r
25!ENDIF\r
26\r
27!INCLUDE PlatformTools.env\r
28\r
29#\r
30# Define some macros we use here. Should get rid of them someday and \r
31# get rid of the extra level of indirection.\r
32#\r
33COMMON_SOURCE = $(EDK_TOOLS_COMMON)\r
34\r
35#\r
36# Common information\r
37#\r
38\r
39INC=$(INC) \\r
40 -I "$(TIANO_TOOLS_SOURCE)\GenFvImage"\r
41\r
42#\r
43# Target specific information\r
44#\r
45\r
46TARGET_NAME=GenFdImage\r
47TARGET_SOURCE_DIR = $(TIANO_TOOLS_SOURCE)\$(TARGET_NAME)\r
48\r
49TARGET_LIB = $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).lib\r
50TARGET_EXE = $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).exe\r
51\r
52TARGET_EXE_SOURCE = "$(TARGET_SOURCE_DIR)\GenFdImageExe.c"\r
53TARGET_EXE_INCLUDE = "$(TARGET_SOURCE_DIR)\GenFdImageExe.h" \\r
54 "$(TARGET_SOURCE_DIR)\GenFdImage.h" \\r
55 "$(COMMON_SOURCE)\ParseInf.h" \\r
56 "$(EDK_SOURCE)\Foundation\Include\TianoCommon.h"\r
57TARGET_EXE_LIBS = "$(TIANO_TOOLS_OUTPUT)\Common.lib" \\r
58 "$(TIANO_TOOLS_OUTPUT)\GenFvImage.lib" \\r
59 "$(TIANO_TOOLS_OUTPUT)\PeimFixup.lib"\r
60\r
61TARGET_LIB_SOURCE = "$(TARGET_SOURCE_DIR)\GenFdImageLib.c"\r
62TARGET_LIB_INCLUDE = "$(TARGET_SOURCE_DIR)\GenFdImage.h" \\r
63 "$(TIANO_TOOLS_SOURCE)\GenFvImage\GenFvImage.h" \\r
64 "$(COMMON_SOURCE)\ParseInf.h" \\r
65 "$(EDK_SOURCE)\Foundation\Include\TianoCommon.h"\r
66TARGET_LIB_LIBS = "$(TIANO_TOOLS_OUTPUT)\Common.lib" \\r
67 "$(TIANO_TOOLS_OUTPUT)\GenFvImage.lib" \\r
68 "$(TIANO_TOOLS_OUTPUT)\PeimFixup.lib"\r
69\r
70\r
71#\r
72# Build targets\r
73#\r
74\r
75all: $(TARGET_LIB) $(TARGET_EXE)\r
76\r
77#\r
78# Build EXE\r
79#\r
80\r
81$(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).obj: $(TARGET_EXE_SOURCE) $(TARGET_EXE_INCLUDE)\r
82 $(CC) $(C_FLAGS) $(INC) $(TARGET_EXE_SOURCE) /Fo$(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).obj\r
83\r
84$(TARGET_EXE): $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).obj $(TARGET_EXE_LIBS) $(TARGET_LIB)\r
85 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).obj $(TARGET_LIB) $(TARGET_EXE_LIBS)\r
86\r
87#\r
88# Build LIB\r
89#\r
90\r
91$(TARGET_LIB): $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.obj $(TARGET_LIB_LIBS)\r
92 $(LIB) $(LIB_FLAGS) $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.obj /OUT:$(TARGET_LIB)\r
93\r
94$(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.obj: $(TARGET_LIB_SOURCE) $(TARGET_LIB_INCLUDE)\r
95 $(CC) $(C_FLAGS) $(INC) $(TARGET_LIB_SOURCE) /Fo$(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.obj\r
96\r
97\r
98clean:\r
99 @if exist $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.* del /q $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME)Lib.* > NUL\r
100 @if exist $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* del /q $(TIANO_TOOLS_OUTPUT)\$(TARGET_NAME).* > NUL\r