Add the ModifyInf tool
[mirror_edk2.git] / Tools / Source / TianoTools / FlashMap / Makefile
CommitLineData
d25c4bf0 1#/*++\r
2# \r
3# Copyright (c) 2004 Intel Corporation. All rights reserved\r
4# This software and associated documentation (if any) is furnished\r
5# under a license and may only be used or copied in accordance\r
6# with the terms of the license. Except as permitted by such\r
7# license, no part of this software or documentation may be\r
8# reproduced, stored in a retrieval system, or transmitted in any\r
9# form or by any means without the express written consent of\r
10# Intel Corporation.\r
11# \r
12# \r
13# Module Name:\r
14# \r
15# Makefile\r
16# \r
17# Abstract:\r
18# \r
19# makefile for building the FlashMap utility\r
20# \r
21#--*/\r
22\r
23#\r
24# Make sure environmental variable EFI_SOURCE is set\r
25#\r
26!IFNDEF EFI_SOURCE\r
27!ERROR EFI_SOURCE environmental variable not set \r
28!ENDIF\r
29\r
30\r
31!INCLUDE PlatformTools.env\r
32\r
33INCLUDE_PATHS = -I $(TIANO_TOOLS_SOURCE)\Common\r
34\r
35#\r
36# Target specific information\r
37#\r
38TARGET_NAME = FlashMap\r
39TARGET_SRC_DIR = $(TIANO_TOOLS_SOURCE)\$(TARGET_NAME)\r
40TARGET_EXE = $(TIANO_TOOLS_OUTPUT)\FlashMap.exe\r
41LIBS = $(LIBS) "$(TIANO_TOOLS_OUTPUT)\Common.lib"\r
42\r
43#\r
44# Build targets\r
45#\r
46all: $(TARGET_EXE)\r
47\r
48OBJECTS = $(TIANO_TOOLS_OUTPUT)\FlashMap.obj \\r
49 $(TIANO_TOOLS_OUTPUT)\FlashDefFile.obj \\r
50 $(TIANO_TOOLS_OUTPUT)\Symbols.obj \\r
51 $(TIANO_TOOLS_OUTPUT)\Microcode.obj \r
52 \r
53# $(TIANO_TOOLS_OUTPUT)\TrackMallocFree.obj \r
54 \r
55#C_FLAGS = $(C_FLAGS) /D TRACK_MALLOC_FREE\r
56C_FLAGS = $(C_FLAGS) /D _malloc=malloc /D _free=free\r
57 \r
58#\r
59# Compile each source file\r
60#\r
61$(TIANO_TOOLS_OUTPUT)\FlashMap.obj : $(TARGET_SRC_DIR)\FlashMap.c $(TARGET_SRC_DIR)\Symbols.h $(INC_DEPS)\r
62 $(CC) $(C_FLAGS) $(INCLUDE_PATHS) $(TARGET_SRC_DIR)\FlashMap.c /Fo$@\r
63\r
64$(TIANO_TOOLS_OUTPUT)\Symbols.obj : $(TARGET_SRC_DIR)\Symbols.c $(INC_DEPS)\r
65 $(CC) $(C_FLAGS) $(INCLUDE_PATHS) $(TARGET_SRC_DIR)\Symbols.c /Fo$@\r
66\r
67$(TIANO_TOOLS_OUTPUT)\Microcode.obj : $(TARGET_SRC_DIR)\Microcode.c $(INC_DEPS)\r
68 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\Microcode.c /Fo$@\r
69\r
70$(TIANO_TOOLS_OUTPUT)\FlashDefFile.obj : $(TARGET_SRC_DIR)\FlashDefFile.c $(INC_DEPS)\r
71 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\FlashDefFile.c /Fo$@\r
72\r
73$(TIANO_TOOLS_OUTPUT)\TrackMallocFree.obj : $(TARGET_SRC_DIR)\TrackMallocFree.c $(INC_DEPS)\r
74 $(CC) $(C_FLAGS) $(INC) $(TARGET_SRC_DIR)\TrackMallocFree.c /Fo$@\r
75\r
76#\r
77# Link the object files together to create the final executable\r
78#\r
79$(TARGET_EXE) : $(OBJECTS) $(LIBS)\r
80 $(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS)\r
81\r