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