1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
## @file
#
# Copyright (c) 2010, Intel Corporation, All rights reserved. <BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
##
BASETOOLS_DIR = $(EDK_TOOLS_PATH)\Bin\Win32
#
# Build Macro
#
ASSEMBLY_CODE_FILE_LIST = $(MODULE_DIR)\bootsect.asm \
$(MODULE_DIR)\bs16.asm \
$(MODULE_DIR)\bs32.asm \
$(MODULE_DIR)\efi32.asm \
$(MODULE_DIR)\Gpt.asm \
$(MODULE_DIR)\Mbr.asm \
$(MODULE_DIR)\start.asm \
$(MODULE_DIR)\start16.asm \
$(MODULE_DIR)\start32.asm
TARGET_FILES = $(OUTPUT_DIR)\bootsect.com \
$(OUTPUT_DIR)\bs16.com \
$(OUTPUT_DIR)\bs32.com \
$(OUTPUT_DIR)\Gpt.com \
$(OUTPUT_DIR)\Mbr.com \
$(OUTPUT_DIR)\Start.com \
$(OUTPUT_DIR)\Start16.com \
$(OUTPUT_DIR)\Start32.com \
$(OUTPUT_DIR)\Start64.com \
$(OUTPUT_DIR)\St16_64.com \
$(OUTPUT_DIR)\St32_64.com \
$(OUTPUT_DIR)\efi32.com2 \
$(OUTPUT_DIR)\efi64.com2
INC =
#OBJECTS =
LIBS =
COMMON_DEPS =
all: $(TARGET_FILES)
#=============
$(OUTPUT_DIR)\bootsect.obj:$(MODULE_DIR)\bootsect.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\bootsect.obj" /FR"$(OUTPUT_DIR)\bootsect.txt" "$(MODULE_DIR)\bootsect.asm"
$(OUTPUT_DIR)\bootsect.com:$(OUTPUT_DIR)\bootsect.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\bootsect.obj,$(OUTPUT_DIR)\bootsect.com,$(OUTPUT_DIR)\bootsect.map,,,
#=============
$(OUTPUT_DIR)\bs16.obj:$(MODULE_DIR)\bs16.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\bs16.obj" "$(MODULE_DIR)\bs16.asm"
$(OUTPUT_DIR)\bs16.com:$(OUTPUT_DIR)\bs16.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\bs16.obj,$(OUTPUT_DIR)\bs16.com,$(OUTPUT_DIR)\bs16.map,,,
#=============
$(OUTPUT_DIR)\bs32.obj:$(MODULE_DIR)\bs32.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\bs32.obj" "$(MODULE_DIR)\bs32.asm"
$(OUTPUT_DIR)\bs32.com:$(OUTPUT_DIR)\bs32.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\bs32.obj,$(OUTPUT_DIR)\bs32.com,$(OUTPUT_DIR)\bs32.map,,,
#=============
$(OUTPUT_DIR)\Gpt.obj:$(MODULE_DIR)\Gpt.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Gpt.obj" "$(MODULE_DIR)\Gpt.asm"
$(OUTPUT_DIR)\Gpt.com:$(OUTPUT_DIR)\Gpt.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Gpt.obj,$(OUTPUT_DIR)\Gpt.com,$(OUTPUT_DIR)\Gpt.map,,,
#=============
$(OUTPUT_DIR)\Mbr.obj:$(MODULE_DIR)\Mbr.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Mbr.obj" "$(MODULE_DIR)\Mbr.asm"
$(OUTPUT_DIR)\Mbr.com:$(OUTPUT_DIR)\Mbr.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Mbr.obj,$(OUTPUT_DIR)\Mbr.com,$(OUTPUT_DIR)\Mbr.map,,,
#============
$(OUTPUT_DIR)\Start.obj:$(MODULE_DIR)\Start.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Start.obj" "$(MODULE_DIR)\Start.asm"
$(OUTPUT_DIR)\Start.com:$(OUTPUT_DIR)\Start.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Start.obj,$(OUTPUT_DIR)\Start.com,$(OUTPUT_DIR)\Start.map,,,
#=============
$(OUTPUT_DIR)\Start16.obj:$(MODULE_DIR)\Start16.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Start16.obj" "$(MODULE_DIR)\Start16.asm"
$(OUTPUT_DIR)\Start16.com:$(OUTPUT_DIR)\Start16.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Start16.obj,$(OUTPUT_DIR)\Start16.com,$(OUTPUT_DIR)\Start16.map,,,
#=============
$(OUTPUT_DIR)\Start32.obj:$(MODULE_DIR)\Start32.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Start32.obj" "$(MODULE_DIR)\Start32.asm"
$(OUTPUT_DIR)\Start32.com:$(OUTPUT_DIR)\Start32.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Start32.obj,$(OUTPUT_DIR)\Start32.com,$(OUTPUT_DIR)\Start32.map,,,
#=============
$(OUTPUT_DIR)\Start64.obj:$(MODULE_DIR)\Start64.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\Start64.obj" "$(MODULE_DIR)\Start64.asm"
$(OUTPUT_DIR)\Start64.com:$(OUTPUT_DIR)\Start64.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\Start64.obj,$(OUTPUT_DIR)\Start64.com,$(OUTPUT_DIR)\Start64.map,,,
#=============
$(OUTPUT_DIR)\St16_64.obj:$(MODULE_DIR)\St16_64.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\St16_64.obj" "$(MODULE_DIR)\St16_64.asm"
$(OUTPUT_DIR)\St16_64.com:$(OUTPUT_DIR)\St16_64.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\St16_64.obj,$(OUTPUT_DIR)\St16_64.com,$(OUTPUT_DIR)\St16_64.map,,,
#=============
$(OUTPUT_DIR)\St32_64.obj:$(MODULE_DIR)\St32_64.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\St32_64.obj" "$(MODULE_DIR)\St32_64.asm"
$(OUTPUT_DIR)\St32_64.com:$(OUTPUT_DIR)\St32_64.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\St32_64.obj,$(OUTPUT_DIR)\St32_64.com,$(OUTPUT_DIR)\St32_64.map,,,
#=============
$(OUTPUT_DIR)\efi32.obj:$(MODULE_DIR)\efi32.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\efi32.obj" "$(MODULE_DIR)\efi32.asm"
$(OUTPUT_DIR)\efi32.com:$(OUTPUT_DIR)\efi32.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\efi32.obj,$(OUTPUT_DIR)\efi32.com,$(OUTPUT_DIR)\efi32.map,,,
#=============
$(OUTPUT_DIR)\efi32.com2:$(OUTPUT_DIR)\efi32.com
$(BASETOOLS_DIR)\Split.exe -f $(OUTPUT_DIR)\efi32.com -t $(OUTPUT_DIR)\efi32.com2 -s 135168
#=============
$(OUTPUT_DIR)\efi64.obj:$(MODULE_DIR)\efi64.asm
"$(ASM)" /c /omf /Fo"$(OUTPUT_DIR)\efi64.obj" "$(MODULE_DIR)\efi64.asm"
$(OUTPUT_DIR)\efi64.com:$(OUTPUT_DIR)\efi64.obj
"$(ASMLINK)" /tiny $(OUTPUT_DIR)\efi64.obj,$(OUTPUT_DIR)\efi64.com,$(OUTPUT_DIR)\efi64.map,,,
#=============
$(OUTPUT_DIR)\efi64.com2:$(OUTPUT_DIR)\efi64.com
$(BASETOOLS_DIR)\Split.exe -f $(OUTPUT_DIR)\efi64.com -t $(OUTPUT_DIR)\efi64.com2 -s 135168
clean:
if exist $(DEBUG_DIR) rmdir /s /q $(DEBUG_DIR)
if exist $(OUTPUT_DIR) rmdir /s /q $(OUTPUT_DIR)
|