]> git.proxmox.com Git - grub2.git/blob - conf/i386-pc.mk
2007-12-25 Robert Millan <rmh@aybabtu.com>
[grub2.git] / conf / i386-pc.mk
1 # -*- makefile -*-
2
3 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
4 COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
5 COMMON_LDFLAGS = -m32 -nostdlib
6
7 # Images.
8 pkglib_IMAGES = boot.img diskboot.img kernel.img pxeboot.img lnxboot.img
9
10 # For boot.img.
11 boot_img_SOURCES = boot/i386/pc/boot.S
12 CLEANFILES += boot.img boot.exec boot_img-boot_i386_pc_boot.o
13 MOSTLYCLEANFILES += boot_img-boot_i386_pc_boot.d
14
15 boot.img: boot.exec
16 $(OBJCOPY) -O binary -R .note -R .comment $< $@
17
18 boot.exec: boot_img-boot_i386_pc_boot.o
19 $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(boot_img_LDFLAGS)
20
21 boot_img-boot_i386_pc_boot.o: boot/i386/pc/boot.S
22 $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(boot_img_ASFLAGS) -MD -c -o $@ $<
23 -include boot_img-boot_i386_pc_boot.d
24
25 boot_img_ASFLAGS = $(COMMON_ASFLAGS)
26 boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
27
28 # For pxeboot.img
29 pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
30 CLEANFILES += pxeboot.img pxeboot.exec pxeboot_img-boot_i386_pc_pxeboot.o
31 MOSTLYCLEANFILES += pxeboot_img-boot_i386_pc_pxeboot.d
32
33 pxeboot.img: pxeboot.exec
34 $(OBJCOPY) -O binary -R .note -R .comment $< $@
35
36 pxeboot.exec: pxeboot_img-boot_i386_pc_pxeboot.o
37 $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(pxeboot_img_LDFLAGS)
38
39 pxeboot_img-boot_i386_pc_pxeboot.o: boot/i386/pc/pxeboot.S
40 $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(pxeboot_img_ASFLAGS) -MD -c -o $@ $<
41 -include pxeboot_img-boot_i386_pc_pxeboot.d
42
43 pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
44 pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
45
46 # For diskboot.img.
47 diskboot_img_SOURCES = boot/i386/pc/diskboot.S
48 CLEANFILES += diskboot.img diskboot.exec diskboot_img-boot_i386_pc_diskboot.o
49 MOSTLYCLEANFILES += diskboot_img-boot_i386_pc_diskboot.d
50
51 diskboot.img: diskboot.exec
52 $(OBJCOPY) -O binary -R .note -R .comment $< $@
53
54 diskboot.exec: diskboot_img-boot_i386_pc_diskboot.o
55 $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(diskboot_img_LDFLAGS)
56
57 diskboot_img-boot_i386_pc_diskboot.o: boot/i386/pc/diskboot.S
58 $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(diskboot_img_ASFLAGS) -MD -c -o $@ $<
59 -include diskboot_img-boot_i386_pc_diskboot.d
60
61 diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
62 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8000
63
64 # For lnxboot.img.
65 lnxboot_img_SOURCES = boot/i386/pc/lnxboot.S
66 CLEANFILES += lnxboot.img lnxboot.exec lnxboot_img-boot_i386_pc_lnxboot.o
67 MOSTLYCLEANFILES += lnxboot_img-boot_i386_pc_lnxboot.d
68
69 lnxboot.img: lnxboot.exec
70 $(OBJCOPY) -O binary -R .note -R .comment $< $@
71
72 lnxboot.exec: lnxboot_img-boot_i386_pc_lnxboot.o
73 $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(lnxboot_img_LDFLAGS)
74
75 lnxboot_img-boot_i386_pc_lnxboot.o: boot/i386/pc/lnxboot.S
76 $(TARGET_CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(lnxboot_img_ASFLAGS) -MD -c -o $@ $<
77 -include lnxboot_img-boot_i386_pc_lnxboot.d
78
79 lnxboot_img_ASFLAGS = $(COMMON_ASFLAGS)
80 lnxboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,6000
81
82 # For kernel.img.
83 kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
84 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
85 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
86 kern/i386/dl.c kern/i386/pc/init.c kern/parser.c kern/partition.c \
87 kern/env.c \
88 term/i386/pc/console.c \
89 symlist.c
90 CLEANFILES += kernel.img kernel.exec kernel_img-kern_i386_pc_startup.o kernel_img-kern_main.o kernel_img-kern_device.o kernel_img-kern_disk.o kernel_img-kern_dl.o kernel_img-kern_file.o kernel_img-kern_fs.o kernel_img-kern_err.o kernel_img-kern_misc.o kernel_img-kern_mm.o kernel_img-kern_loader.o kernel_img-kern_rescue.o kernel_img-kern_term.o kernel_img-kern_i386_dl.o kernel_img-kern_i386_pc_init.o kernel_img-kern_parser.o kernel_img-kern_partition.o kernel_img-kern_env.o kernel_img-term_i386_pc_console.o kernel_img-symlist.o
91 MOSTLYCLEANFILES += kernel_img-kern_i386_pc_startup.d kernel_img-kern_main.d kernel_img-kern_device.d kernel_img-kern_disk.d kernel_img-kern_dl.d kernel_img-kern_file.d kernel_img-kern_fs.d kernel_img-kern_err.d kernel_img-kern_misc.d kernel_img-kern_mm.d kernel_img-kern_loader.d kernel_img-kern_rescue.d kernel_img-kern_term.d kernel_img-kern_i386_dl.d kernel_img-kern_i386_pc_init.d kernel_img-kern_parser.d kernel_img-kern_partition.d kernel_img-kern_env.d kernel_img-term_i386_pc_console.d kernel_img-symlist.d
92
93 kernel.img: kernel.exec
94 $(OBJCOPY) -O binary -R .note -R .comment $< $@
95
96 kernel.exec: kernel_img-kern_i386_pc_startup.o kernel_img-kern_main.o kernel_img-kern_device.o kernel_img-kern_disk.o kernel_img-kern_dl.o kernel_img-kern_file.o kernel_img-kern_fs.o kernel_img-kern_err.o kernel_img-kern_misc.o kernel_img-kern_mm.o kernel_img-kern_loader.o kernel_img-kern_rescue.o kernel_img-kern_term.o kernel_img-kern_i386_dl.o kernel_img-kern_i386_pc_init.o kernel_img-kern_parser.o kernel_img-kern_partition.o kernel_img-kern_env.o kernel_img-term_i386_pc_console.o kernel_img-symlist.o
97 $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(kernel_img_LDFLAGS)
98
99 kernel_img-kern_i386_pc_startup.o: kern/i386/pc/startup.S
100 $(TARGET_CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(kernel_img_ASFLAGS) -MD -c -o $@ $<
101 -include kernel_img-kern_i386_pc_startup.d
102
103 kernel_img-kern_main.o: kern/main.c
104 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
105 -include kernel_img-kern_main.d
106
107 kernel_img-kern_device.o: kern/device.c
108 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
109 -include kernel_img-kern_device.d
110
111 kernel_img-kern_disk.o: kern/disk.c
112 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
113 -include kernel_img-kern_disk.d
114
115 kernel_img-kern_dl.o: kern/dl.c
116 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
117 -include kernel_img-kern_dl.d
118
119 kernel_img-kern_file.o: kern/file.c
120 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
121 -include kernel_img-kern_file.d
122
123 kernel_img-kern_fs.o: kern/fs.c
124 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
125 -include kernel_img-kern_fs.d
126
127 kernel_img-kern_err.o: kern/err.c
128 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
129 -include kernel_img-kern_err.d
130
131 kernel_img-kern_misc.o: kern/misc.c
132 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
133 -include kernel_img-kern_misc.d
134
135 kernel_img-kern_mm.o: kern/mm.c
136 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
137 -include kernel_img-kern_mm.d
138
139 kernel_img-kern_loader.o: kern/loader.c
140 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
141 -include kernel_img-kern_loader.d
142
143 kernel_img-kern_rescue.o: kern/rescue.c
144 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
145 -include kernel_img-kern_rescue.d
146
147 kernel_img-kern_term.o: kern/term.c
148 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
149 -include kernel_img-kern_term.d
150
151 kernel_img-kern_i386_dl.o: kern/i386/dl.c
152 $(TARGET_CC) -Ikern/i386 -I$(srcdir)/kern/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
153 -include kernel_img-kern_i386_dl.d
154
155 kernel_img-kern_i386_pc_init.o: kern/i386/pc/init.c
156 $(TARGET_CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
157 -include kernel_img-kern_i386_pc_init.d
158
159 kernel_img-kern_parser.o: kern/parser.c
160 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
161 -include kernel_img-kern_parser.d
162
163 kernel_img-kern_partition.o: kern/partition.c
164 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
165 -include kernel_img-kern_partition.d
166
167 kernel_img-kern_env.o: kern/env.c
168 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
169 -include kernel_img-kern_env.d
170
171 kernel_img-term_i386_pc_console.o: term/i386/pc/console.c
172 $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
173 -include kernel_img-term_i386_pc_console.d
174
175 kernel_img-symlist.o: symlist.c
176 $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_img_CFLAGS) -MD -c -o $@ $<
177 -include kernel_img-symlist.d
178
179 kernel_img_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
180 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
181 partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \
182 machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
183 machine/memory.h machine/loader.h machine/vga.h machine/vbe.h
184 kernel_img_CFLAGS = $(COMMON_CFLAGS)
185 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
186 kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
187
188 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
189 DEFSYMFILES += kernel_syms.lst
190
191 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
192 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
193
194 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
195 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
196
197 # Utilities.
198 bin_UTILITIES = grub-mkimage
199 sbin_UTILITIES = grub-setup grub-mkdevicemap grub-probe
200 ifeq ($(enable_grub_emu), yes)
201 sbin_UTILITIES += grub-emu
202 endif
203
204 # For grub-mkimage.
205 grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
206 util/resolve.c
207 CLEANFILES += grub-mkimage grub_mkimage-util_i386_pc_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
208 MOSTLYCLEANFILES += grub_mkimage-util_i386_pc_grub_mkimage.d grub_mkimage-util_misc.d grub_mkimage-util_resolve.d
209
210 grub-mkimage: $(grub_mkimage_DEPENDENCIES) grub_mkimage-util_i386_pc_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
211 $(CC) -o $@ grub_mkimage-util_i386_pc_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o $(LDFLAGS) $(grub_mkimage_LDFLAGS)
212
213 grub_mkimage-util_i386_pc_grub_mkimage.o: util/i386/pc/grub-mkimage.c $(util/i386/pc/grub-mkimage.c_DEPENDENCIES)
214 $(CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
215 -include grub_mkimage-util_i386_pc_grub_mkimage.d
216
217 grub_mkimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
218 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
219 -include grub_mkimage-util_misc.d
220
221 grub_mkimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
222 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
223 -include grub_mkimage-util_resolve.d
224
225 grub_mkimage_LDFLAGS = $(LIBLZO)
226
227 # For grub-setup.
228 util/i386/pc/grub-setup.c_DEPENDENCIES = grub_setup_init.h
229 grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.c \
230 util/misc.c util/getroot.c kern/device.c kern/disk.c \
231 kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
232 fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
233 partmap/gpt.c \
234 fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ntfs.c fs/ntfscomp.c \
235 fs/hfsplus.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c \
236 util/raid.c util/lvm.c grub_setup_init.c
237 CLEANFILES += grub-setup grub_setup-util_i386_pc_grub_setup.o grub_setup-util_biosdisk.o grub_setup-util_misc.o grub_setup-util_getroot.o grub_setup-kern_device.o grub_setup-kern_disk.o grub_setup-kern_err.o grub_setup-kern_misc.o grub_setup-fs_fat.o grub_setup-fs_ext2.o grub_setup-fs_xfs.o grub_setup-fs_affs.o grub_setup-fs_sfs.o grub_setup-kern_parser.o grub_setup-kern_partition.o grub_setup-partmap_pc.o grub_setup-partmap_gpt.o grub_setup-fs_ufs.o grub_setup-fs_minix.o grub_setup-fs_hfs.o grub_setup-fs_jfs.o grub_setup-fs_ntfs.o grub_setup-fs_ntfscomp.o grub_setup-fs_hfsplus.o grub_setup-kern_file.o grub_setup-kern_fs.o grub_setup-kern_env.o grub_setup-fs_fshelp.o grub_setup-util_raid.o grub_setup-util_lvm.o grub_setup-grub_setup_init.o
238 MOSTLYCLEANFILES += grub_setup-util_i386_pc_grub_setup.d grub_setup-util_biosdisk.d grub_setup-util_misc.d grub_setup-util_getroot.d grub_setup-kern_device.d grub_setup-kern_disk.d grub_setup-kern_err.d grub_setup-kern_misc.d grub_setup-fs_fat.d grub_setup-fs_ext2.d grub_setup-fs_xfs.d grub_setup-fs_affs.d grub_setup-fs_sfs.d grub_setup-kern_parser.d grub_setup-kern_partition.d grub_setup-partmap_pc.d grub_setup-partmap_gpt.d grub_setup-fs_ufs.d grub_setup-fs_minix.d grub_setup-fs_hfs.d grub_setup-fs_jfs.d grub_setup-fs_ntfs.d grub_setup-fs_ntfscomp.d grub_setup-fs_hfsplus.d grub_setup-kern_file.d grub_setup-kern_fs.d grub_setup-kern_env.d grub_setup-fs_fshelp.d grub_setup-util_raid.d grub_setup-util_lvm.d grub_setup-grub_setup_init.d
239
240 grub-setup: $(grub_setup_DEPENDENCIES) grub_setup-util_i386_pc_grub_setup.o grub_setup-util_biosdisk.o grub_setup-util_misc.o grub_setup-util_getroot.o grub_setup-kern_device.o grub_setup-kern_disk.o grub_setup-kern_err.o grub_setup-kern_misc.o grub_setup-fs_fat.o grub_setup-fs_ext2.o grub_setup-fs_xfs.o grub_setup-fs_affs.o grub_setup-fs_sfs.o grub_setup-kern_parser.o grub_setup-kern_partition.o grub_setup-partmap_pc.o grub_setup-partmap_gpt.o grub_setup-fs_ufs.o grub_setup-fs_minix.o grub_setup-fs_hfs.o grub_setup-fs_jfs.o grub_setup-fs_ntfs.o grub_setup-fs_ntfscomp.o grub_setup-fs_hfsplus.o grub_setup-kern_file.o grub_setup-kern_fs.o grub_setup-kern_env.o grub_setup-fs_fshelp.o grub_setup-util_raid.o grub_setup-util_lvm.o grub_setup-grub_setup_init.o
241 $(CC) -o $@ grub_setup-util_i386_pc_grub_setup.o grub_setup-util_biosdisk.o grub_setup-util_misc.o grub_setup-util_getroot.o grub_setup-kern_device.o grub_setup-kern_disk.o grub_setup-kern_err.o grub_setup-kern_misc.o grub_setup-fs_fat.o grub_setup-fs_ext2.o grub_setup-fs_xfs.o grub_setup-fs_affs.o grub_setup-fs_sfs.o grub_setup-kern_parser.o grub_setup-kern_partition.o grub_setup-partmap_pc.o grub_setup-partmap_gpt.o grub_setup-fs_ufs.o grub_setup-fs_minix.o grub_setup-fs_hfs.o grub_setup-fs_jfs.o grub_setup-fs_ntfs.o grub_setup-fs_ntfscomp.o grub_setup-fs_hfsplus.o grub_setup-kern_file.o grub_setup-kern_fs.o grub_setup-kern_env.o grub_setup-fs_fshelp.o grub_setup-util_raid.o grub_setup-util_lvm.o grub_setup-grub_setup_init.o $(LDFLAGS) $(grub_setup_LDFLAGS)
242
243 grub_setup-util_i386_pc_grub_setup.o: util/i386/pc/grub-setup.c $(util/i386/pc/grub-setup.c_DEPENDENCIES)
244 $(CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
245 -include grub_setup-util_i386_pc_grub_setup.d
246
247 grub_setup-util_biosdisk.o: util/biosdisk.c $(util/biosdisk.c_DEPENDENCIES)
248 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
249 -include grub_setup-util_biosdisk.d
250
251 grub_setup-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
252 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
253 -include grub_setup-util_misc.d
254
255 grub_setup-util_getroot.o: util/getroot.c $(util/getroot.c_DEPENDENCIES)
256 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
257 -include grub_setup-util_getroot.d
258
259 grub_setup-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
260 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
261 -include grub_setup-kern_device.d
262
263 grub_setup-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
264 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
265 -include grub_setup-kern_disk.d
266
267 grub_setup-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
268 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
269 -include grub_setup-kern_err.d
270
271 grub_setup-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
272 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
273 -include grub_setup-kern_misc.d
274
275 grub_setup-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
276 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
277 -include grub_setup-fs_fat.d
278
279 grub_setup-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
280 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
281 -include grub_setup-fs_ext2.d
282
283 grub_setup-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
284 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
285 -include grub_setup-fs_xfs.d
286
287 grub_setup-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
288 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
289 -include grub_setup-fs_affs.d
290
291 grub_setup-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
292 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
293 -include grub_setup-fs_sfs.d
294
295 grub_setup-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
296 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
297 -include grub_setup-kern_parser.d
298
299 grub_setup-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
300 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
301 -include grub_setup-kern_partition.d
302
303 grub_setup-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
304 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
305 -include grub_setup-partmap_pc.d
306
307 grub_setup-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
308 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
309 -include grub_setup-partmap_gpt.d
310
311 grub_setup-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
312 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
313 -include grub_setup-fs_ufs.d
314
315 grub_setup-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
316 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
317 -include grub_setup-fs_minix.d
318
319 grub_setup-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
320 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
321 -include grub_setup-fs_hfs.d
322
323 grub_setup-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
324 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
325 -include grub_setup-fs_jfs.d
326
327 grub_setup-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
328 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
329 -include grub_setup-fs_ntfs.d
330
331 grub_setup-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
332 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
333 -include grub_setup-fs_ntfscomp.d
334
335 grub_setup-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
336 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
337 -include grub_setup-fs_hfsplus.d
338
339 grub_setup-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
340 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
341 -include grub_setup-kern_file.d
342
343 grub_setup-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
344 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
345 -include grub_setup-kern_fs.d
346
347 grub_setup-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
348 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
349 -include grub_setup-kern_env.d
350
351 grub_setup-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
352 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
353 -include grub_setup-fs_fshelp.d
354
355 grub_setup-util_raid.o: util/raid.c $(util/raid.c_DEPENDENCIES)
356 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
357 -include grub_setup-util_raid.d
358
359 grub_setup-util_lvm.o: util/lvm.c $(util/lvm.c_DEPENDENCIES)
360 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
361 -include grub_setup-util_lvm.d
362
363 grub_setup-grub_setup_init.o: grub_setup_init.c $(grub_setup_init.c_DEPENDENCIES)
364 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_setup_CFLAGS) -MD -c -o $@ $<
365 -include grub_setup-grub_setup_init.d
366
367
368 # For grub-mkdevicemap.
369 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
370 util/i386/get_disk_name.c
371 CLEANFILES += grub-mkdevicemap grub_mkdevicemap-util_grub_mkdevicemap.o grub_mkdevicemap-util_misc.o grub_mkdevicemap-util_i386_get_disk_name.o
372 MOSTLYCLEANFILES += grub_mkdevicemap-util_grub_mkdevicemap.d grub_mkdevicemap-util_misc.d grub_mkdevicemap-util_i386_get_disk_name.d
373
374 grub-mkdevicemap: $(grub_mkdevicemap_DEPENDENCIES) grub_mkdevicemap-util_grub_mkdevicemap.o grub_mkdevicemap-util_misc.o grub_mkdevicemap-util_i386_get_disk_name.o
375 $(CC) -o $@ grub_mkdevicemap-util_grub_mkdevicemap.o grub_mkdevicemap-util_misc.o grub_mkdevicemap-util_i386_get_disk_name.o $(LDFLAGS) $(grub_mkdevicemap_LDFLAGS)
376
377 grub_mkdevicemap-util_grub_mkdevicemap.o: util/grub-mkdevicemap.c $(util/grub-mkdevicemap.c_DEPENDENCIES)
378 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkdevicemap_CFLAGS) -MD -c -o $@ $<
379 -include grub_mkdevicemap-util_grub_mkdevicemap.d
380
381 grub_mkdevicemap-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
382 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkdevicemap_CFLAGS) -MD -c -o $@ $<
383 -include grub_mkdevicemap-util_misc.d
384
385 grub_mkdevicemap-util_i386_get_disk_name.o: util/i386/get_disk_name.c $(util/i386/get_disk_name.c_DEPENDENCIES)
386 $(CC) -Iutil/i386 -I$(srcdir)/util/i386 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkdevicemap_CFLAGS) -MD -c -o $@ $<
387 -include grub_mkdevicemap-util_i386_get_disk_name.d
388
389
390 # For grub-probe.
391 util/grub-probe.c_DEPENDENCIES = grub_probe_init.h
392 grub_probe_SOURCES = util/grub-probe.c \
393 util/biosdisk.c util/misc.c util/getroot.c \
394 kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c \
395 fs/ext2.c kern/parser.c kern/partition.c \
396 partmap/pc.c partmap/apple.c partmap/gpt.c \
397 fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ntfs.c kern/fs.c \
398 kern/env.c fs/fshelp.c fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c \
399 fs/ntfscomp.c disk/lvm.c disk/raid.c grub_probe_init.c
400 CLEANFILES += grub-probe grub_probe-util_grub_probe.o grub_probe-util_biosdisk.o grub_probe-util_misc.o grub_probe-util_getroot.o grub_probe-kern_device.o grub_probe-kern_disk.o grub_probe-kern_err.o grub_probe-kern_misc.o grub_probe-fs_fat.o grub_probe-fs_ext2.o grub_probe-kern_parser.o grub_probe-kern_partition.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-fs_ufs.o grub_probe-fs_minix.o grub_probe-fs_hfs.o grub_probe-fs_jfs.o grub_probe-fs_ntfs.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-fs_xfs.o grub_probe-fs_affs.o grub_probe-fs_sfs.o grub_probe-fs_hfsplus.o grub_probe-fs_ntfscomp.o grub_probe-disk_lvm.o grub_probe-disk_raid.o grub_probe-grub_probe_init.o
401 MOSTLYCLEANFILES += grub_probe-util_grub_probe.d grub_probe-util_biosdisk.d grub_probe-util_misc.d grub_probe-util_getroot.d grub_probe-kern_device.d grub_probe-kern_disk.d grub_probe-kern_err.d grub_probe-kern_misc.d grub_probe-fs_fat.d grub_probe-fs_ext2.d grub_probe-kern_parser.d grub_probe-kern_partition.d grub_probe-partmap_pc.d grub_probe-partmap_apple.d grub_probe-partmap_gpt.d grub_probe-fs_ufs.d grub_probe-fs_minix.d grub_probe-fs_hfs.d grub_probe-fs_jfs.d grub_probe-fs_ntfs.d grub_probe-kern_fs.d grub_probe-kern_env.d grub_probe-fs_fshelp.d grub_probe-fs_xfs.d grub_probe-fs_affs.d grub_probe-fs_sfs.d grub_probe-fs_hfsplus.d grub_probe-fs_ntfscomp.d grub_probe-disk_lvm.d grub_probe-disk_raid.d grub_probe-grub_probe_init.d
402
403 grub-probe: $(grub_probe_DEPENDENCIES) grub_probe-util_grub_probe.o grub_probe-util_biosdisk.o grub_probe-util_misc.o grub_probe-util_getroot.o grub_probe-kern_device.o grub_probe-kern_disk.o grub_probe-kern_err.o grub_probe-kern_misc.o grub_probe-fs_fat.o grub_probe-fs_ext2.o grub_probe-kern_parser.o grub_probe-kern_partition.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-fs_ufs.o grub_probe-fs_minix.o grub_probe-fs_hfs.o grub_probe-fs_jfs.o grub_probe-fs_ntfs.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-fs_xfs.o grub_probe-fs_affs.o grub_probe-fs_sfs.o grub_probe-fs_hfsplus.o grub_probe-fs_ntfscomp.o grub_probe-disk_lvm.o grub_probe-disk_raid.o grub_probe-grub_probe_init.o
404 $(CC) -o $@ grub_probe-util_grub_probe.o grub_probe-util_biosdisk.o grub_probe-util_misc.o grub_probe-util_getroot.o grub_probe-kern_device.o grub_probe-kern_disk.o grub_probe-kern_err.o grub_probe-kern_misc.o grub_probe-fs_fat.o grub_probe-fs_ext2.o grub_probe-kern_parser.o grub_probe-kern_partition.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-fs_ufs.o grub_probe-fs_minix.o grub_probe-fs_hfs.o grub_probe-fs_jfs.o grub_probe-fs_ntfs.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-fs_xfs.o grub_probe-fs_affs.o grub_probe-fs_sfs.o grub_probe-fs_hfsplus.o grub_probe-fs_ntfscomp.o grub_probe-disk_lvm.o grub_probe-disk_raid.o grub_probe-grub_probe_init.o $(LDFLAGS) $(grub_probe_LDFLAGS)
405
406 grub_probe-util_grub_probe.o: util/grub-probe.c $(util/grub-probe.c_DEPENDENCIES)
407 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
408 -include grub_probe-util_grub_probe.d
409
410 grub_probe-util_biosdisk.o: util/biosdisk.c $(util/biosdisk.c_DEPENDENCIES)
411 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
412 -include grub_probe-util_biosdisk.d
413
414 grub_probe-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
415 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
416 -include grub_probe-util_misc.d
417
418 grub_probe-util_getroot.o: util/getroot.c $(util/getroot.c_DEPENDENCIES)
419 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
420 -include grub_probe-util_getroot.d
421
422 grub_probe-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
423 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
424 -include grub_probe-kern_device.d
425
426 grub_probe-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
427 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
428 -include grub_probe-kern_disk.d
429
430 grub_probe-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
431 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
432 -include grub_probe-kern_err.d
433
434 grub_probe-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
435 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
436 -include grub_probe-kern_misc.d
437
438 grub_probe-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
439 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
440 -include grub_probe-fs_fat.d
441
442 grub_probe-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
443 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
444 -include grub_probe-fs_ext2.d
445
446 grub_probe-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
447 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
448 -include grub_probe-kern_parser.d
449
450 grub_probe-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
451 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
452 -include grub_probe-kern_partition.d
453
454 grub_probe-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
455 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
456 -include grub_probe-partmap_pc.d
457
458 grub_probe-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
459 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
460 -include grub_probe-partmap_apple.d
461
462 grub_probe-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
463 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
464 -include grub_probe-partmap_gpt.d
465
466 grub_probe-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
467 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
468 -include grub_probe-fs_ufs.d
469
470 grub_probe-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
471 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
472 -include grub_probe-fs_minix.d
473
474 grub_probe-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
475 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
476 -include grub_probe-fs_hfs.d
477
478 grub_probe-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
479 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
480 -include grub_probe-fs_jfs.d
481
482 grub_probe-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
483 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
484 -include grub_probe-fs_ntfs.d
485
486 grub_probe-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
487 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
488 -include grub_probe-kern_fs.d
489
490 grub_probe-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
491 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
492 -include grub_probe-kern_env.d
493
494 grub_probe-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
495 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
496 -include grub_probe-fs_fshelp.d
497
498 grub_probe-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
499 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
500 -include grub_probe-fs_xfs.d
501
502 grub_probe-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
503 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
504 -include grub_probe-fs_affs.d
505
506 grub_probe-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
507 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
508 -include grub_probe-fs_sfs.d
509
510 grub_probe-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
511 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
512 -include grub_probe-fs_hfsplus.d
513
514 grub_probe-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
515 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
516 -include grub_probe-fs_ntfscomp.d
517
518 grub_probe-disk_lvm.o: disk/lvm.c $(disk/lvm.c_DEPENDENCIES)
519 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
520 -include grub_probe-disk_lvm.d
521
522 grub_probe-disk_raid.o: disk/raid.c $(disk/raid.c_DEPENDENCIES)
523 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
524 -include grub_probe-disk_raid.d
525
526 grub_probe-grub_probe_init.o: grub_probe_init.c $(grub_probe_init.c_DEPENDENCIES)
527 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
528 -include grub_probe-grub_probe_init.d
529
530
531 # For grub-emu.
532 grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \
533 grub_emu_init.h
534 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
535 commands/configfile.c commands/echo.c commands/help.c \
536 commands/terminal.c commands/ls.c commands/test.c \
537 commands/search.c commands/blocklist.c commands/hexdump.c \
538 commands/i386/pc/halt.c commands/i386/pc/reboot.c \
539 commands/i386/cpuid.c \
540 disk/host.c disk/loopback.c disk/raid.c disk/lvm.c \
541 fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
542 fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
543 fs/ntfs.c fs/ntfscomp.c \
544 io/gzio.c \
545 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
546 kern/err.c \
547 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
548 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
549 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
550 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
551 normal/completion.c normal/main.c \
552 normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
553 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
554 partmap/acorn.c partmap/gpt.c \
555 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
556 util/biosdisk.c util/getroot.c \
557 util/i386/pc/misc.c grub_emu_init.c
558 CLEANFILES += grub-emu grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_echo.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_blocklist.o grub_emu-commands_hexdump.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-commands_i386_cpuid.o grub_emu-disk_host.o grub_emu-disk_loopback.o grub_emu-disk_raid.o grub_emu-disk_lvm.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-fs_ntfs.o grub_emu-fs_ntfscomp.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_elf.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_hostfs.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_biosdisk.o grub_emu-util_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
559 MOSTLYCLEANFILES += grub_emu-commands_boot.d grub_emu-commands_cat.d grub_emu-commands_cmp.d grub_emu-commands_configfile.d grub_emu-commands_echo.d grub_emu-commands_help.d grub_emu-commands_terminal.d grub_emu-commands_ls.d grub_emu-commands_test.d grub_emu-commands_search.d grub_emu-commands_blocklist.d grub_emu-commands_hexdump.d grub_emu-commands_i386_pc_halt.d grub_emu-commands_i386_pc_reboot.d grub_emu-commands_i386_cpuid.d grub_emu-disk_host.d grub_emu-disk_loopback.d grub_emu-disk_raid.d grub_emu-disk_lvm.d grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d grub_emu-fs_ntfs.d grub_emu-fs_ntfscomp.d grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d grub_emu-kern_elf.d grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-normal_execute.d grub_emu-kern_file.d grub_emu-kern_fs.d grub_emu-normal_lexer.d grub_emu-kern_loader.d grub_emu-kern_main.d grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-grub_script_tab.d grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d grub_emu-normal_cmdline.d grub_emu-normal_command.d grub_emu-normal_function.d grub_emu-normal_completion.d grub_emu-normal_main.d grub_emu-normal_menu.d grub_emu-normal_menu_entry.d grub_emu-normal_misc.d grub_emu-normal_script.d grub_emu-partmap_amiga.d grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d grub_emu-partmap_acorn.d grub_emu-partmap_gpt.d grub_emu-util_console.d grub_emu-util_hostfs.d grub_emu-util_grub_emu.d grub_emu-util_misc.d grub_emu-util_biosdisk.d grub_emu-util_getroot.d grub_emu-util_i386_pc_misc.d grub_emu-grub_emu_init.d
560
561 grub-emu: $(grub_emu_DEPENDENCIES) grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_echo.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_blocklist.o grub_emu-commands_hexdump.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-commands_i386_cpuid.o grub_emu-disk_host.o grub_emu-disk_loopback.o grub_emu-disk_raid.o grub_emu-disk_lvm.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-fs_ntfs.o grub_emu-fs_ntfscomp.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_elf.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_hostfs.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_biosdisk.o grub_emu-util_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o
562 $(CC) -o $@ grub_emu-commands_boot.o grub_emu-commands_cat.o grub_emu-commands_cmp.o grub_emu-commands_configfile.o grub_emu-commands_echo.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_ls.o grub_emu-commands_test.o grub_emu-commands_search.o grub_emu-commands_blocklist.o grub_emu-commands_hexdump.o grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o grub_emu-commands_i386_cpuid.o grub_emu-disk_host.o grub_emu-disk_loopback.o grub_emu-disk_raid.o grub_emu-disk_lvm.o grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-fs_hfsplus.o grub_emu-fs_ntfs.o grub_emu-fs_ntfscomp.o grub_emu-io_gzio.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_elf.o grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-grub_script_tab.o grub_emu-kern_partition.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_function.o grub_emu-normal_completion.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_menu_entry.o grub_emu-normal_misc.o grub_emu-normal_script.o grub_emu-partmap_amiga.o grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o grub_emu-util_hostfs.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_biosdisk.o grub_emu-util_getroot.o grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o $(LDFLAGS) $(grub_emu_LDFLAGS)
563
564 grub_emu-commands_boot.o: commands/boot.c $(commands/boot.c_DEPENDENCIES)
565 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
566 -include grub_emu-commands_boot.d
567
568 grub_emu-commands_cat.o: commands/cat.c $(commands/cat.c_DEPENDENCIES)
569 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
570 -include grub_emu-commands_cat.d
571
572 grub_emu-commands_cmp.o: commands/cmp.c $(commands/cmp.c_DEPENDENCIES)
573 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
574 -include grub_emu-commands_cmp.d
575
576 grub_emu-commands_configfile.o: commands/configfile.c $(commands/configfile.c_DEPENDENCIES)
577 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
578 -include grub_emu-commands_configfile.d
579
580 grub_emu-commands_echo.o: commands/echo.c $(commands/echo.c_DEPENDENCIES)
581 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
582 -include grub_emu-commands_echo.d
583
584 grub_emu-commands_help.o: commands/help.c $(commands/help.c_DEPENDENCIES)
585 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
586 -include grub_emu-commands_help.d
587
588 grub_emu-commands_terminal.o: commands/terminal.c $(commands/terminal.c_DEPENDENCIES)
589 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
590 -include grub_emu-commands_terminal.d
591
592 grub_emu-commands_ls.o: commands/ls.c $(commands/ls.c_DEPENDENCIES)
593 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
594 -include grub_emu-commands_ls.d
595
596 grub_emu-commands_test.o: commands/test.c $(commands/test.c_DEPENDENCIES)
597 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
598 -include grub_emu-commands_test.d
599
600 grub_emu-commands_search.o: commands/search.c $(commands/search.c_DEPENDENCIES)
601 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
602 -include grub_emu-commands_search.d
603
604 grub_emu-commands_blocklist.o: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES)
605 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
606 -include grub_emu-commands_blocklist.d
607
608 grub_emu-commands_hexdump.o: commands/hexdump.c $(commands/hexdump.c_DEPENDENCIES)
609 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
610 -include grub_emu-commands_hexdump.d
611
612 grub_emu-commands_i386_pc_halt.o: commands/i386/pc/halt.c $(commands/i386/pc/halt.c_DEPENDENCIES)
613 $(CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
614 -include grub_emu-commands_i386_pc_halt.d
615
616 grub_emu-commands_i386_pc_reboot.o: commands/i386/pc/reboot.c $(commands/i386/pc/reboot.c_DEPENDENCIES)
617 $(CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
618 -include grub_emu-commands_i386_pc_reboot.d
619
620 grub_emu-commands_i386_cpuid.o: commands/i386/cpuid.c $(commands/i386/cpuid.c_DEPENDENCIES)
621 $(CC) -Icommands/i386 -I$(srcdir)/commands/i386 $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
622 -include grub_emu-commands_i386_cpuid.d
623
624 grub_emu-disk_host.o: disk/host.c $(disk/host.c_DEPENDENCIES)
625 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
626 -include grub_emu-disk_host.d
627
628 grub_emu-disk_loopback.o: disk/loopback.c $(disk/loopback.c_DEPENDENCIES)
629 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
630 -include grub_emu-disk_loopback.d
631
632 grub_emu-disk_raid.o: disk/raid.c $(disk/raid.c_DEPENDENCIES)
633 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
634 -include grub_emu-disk_raid.d
635
636 grub_emu-disk_lvm.o: disk/lvm.c $(disk/lvm.c_DEPENDENCIES)
637 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
638 -include grub_emu-disk_lvm.d
639
640 grub_emu-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
641 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
642 -include grub_emu-fs_affs.d
643
644 grub_emu-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
645 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
646 -include grub_emu-fs_ext2.d
647
648 grub_emu-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
649 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
650 -include grub_emu-fs_fat.d
651
652 grub_emu-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
653 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
654 -include grub_emu-fs_fshelp.d
655
656 grub_emu-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
657 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
658 -include grub_emu-fs_hfs.d
659
660 grub_emu-fs_iso9660.o: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES)
661 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
662 -include grub_emu-fs_iso9660.d
663
664 grub_emu-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
665 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
666 -include grub_emu-fs_jfs.d
667
668 grub_emu-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
669 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
670 -include grub_emu-fs_minix.d
671
672 grub_emu-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
673 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
674 -include grub_emu-fs_sfs.d
675
676 grub_emu-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
677 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
678 -include grub_emu-fs_ufs.d
679
680 grub_emu-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
681 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
682 -include grub_emu-fs_xfs.d
683
684 grub_emu-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
685 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
686 -include grub_emu-fs_hfsplus.d
687
688 grub_emu-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
689 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
690 -include grub_emu-fs_ntfs.d
691
692 grub_emu-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
693 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
694 -include grub_emu-fs_ntfscomp.d
695
696 grub_emu-io_gzio.o: io/gzio.c $(io/gzio.c_DEPENDENCIES)
697 $(CC) -Iio -I$(srcdir)/io $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
698 -include grub_emu-io_gzio.d
699
700 grub_emu-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
701 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
702 -include grub_emu-kern_device.d
703
704 grub_emu-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
705 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
706 -include grub_emu-kern_disk.d
707
708 grub_emu-kern_dl.o: kern/dl.c $(kern/dl.c_DEPENDENCIES)
709 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
710 -include grub_emu-kern_dl.d
711
712 grub_emu-kern_elf.o: kern/elf.c $(kern/elf.c_DEPENDENCIES)
713 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
714 -include grub_emu-kern_elf.d
715
716 grub_emu-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
717 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
718 -include grub_emu-kern_env.d
719
720 grub_emu-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
721 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
722 -include grub_emu-kern_err.d
723
724 grub_emu-normal_execute.o: normal/execute.c $(normal/execute.c_DEPENDENCIES)
725 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
726 -include grub_emu-normal_execute.d
727
728 grub_emu-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
729 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
730 -include grub_emu-kern_file.d
731
732 grub_emu-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
733 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
734 -include grub_emu-kern_fs.d
735
736 grub_emu-normal_lexer.o: normal/lexer.c $(normal/lexer.c_DEPENDENCIES)
737 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
738 -include grub_emu-normal_lexer.d
739
740 grub_emu-kern_loader.o: kern/loader.c $(kern/loader.c_DEPENDENCIES)
741 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
742 -include grub_emu-kern_loader.d
743
744 grub_emu-kern_main.o: kern/main.c $(kern/main.c_DEPENDENCIES)
745 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
746 -include grub_emu-kern_main.d
747
748 grub_emu-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
749 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
750 -include grub_emu-kern_misc.d
751
752 grub_emu-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
753 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
754 -include grub_emu-kern_parser.d
755
756 grub_emu-grub_script_tab.o: grub_script.tab.c $(grub_script.tab.c_DEPENDENCIES)
757 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
758 -include grub_emu-grub_script_tab.d
759
760 grub_emu-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
761 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
762 -include grub_emu-kern_partition.d
763
764 grub_emu-kern_rescue.o: kern/rescue.c $(kern/rescue.c_DEPENDENCIES)
765 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
766 -include grub_emu-kern_rescue.d
767
768 grub_emu-kern_term.o: kern/term.c $(kern/term.c_DEPENDENCIES)
769 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
770 -include grub_emu-kern_term.d
771
772 grub_emu-normal_arg.o: normal/arg.c $(normal/arg.c_DEPENDENCIES)
773 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
774 -include grub_emu-normal_arg.d
775
776 grub_emu-normal_cmdline.o: normal/cmdline.c $(normal/cmdline.c_DEPENDENCIES)
777 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
778 -include grub_emu-normal_cmdline.d
779
780 grub_emu-normal_command.o: normal/command.c $(normal/command.c_DEPENDENCIES)
781 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
782 -include grub_emu-normal_command.d
783
784 grub_emu-normal_function.o: normal/function.c $(normal/function.c_DEPENDENCIES)
785 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
786 -include grub_emu-normal_function.d
787
788 grub_emu-normal_completion.o: normal/completion.c $(normal/completion.c_DEPENDENCIES)
789 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
790 -include grub_emu-normal_completion.d
791
792 grub_emu-normal_main.o: normal/main.c $(normal/main.c_DEPENDENCIES)
793 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
794 -include grub_emu-normal_main.d
795
796 grub_emu-normal_menu.o: normal/menu.c $(normal/menu.c_DEPENDENCIES)
797 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
798 -include grub_emu-normal_menu.d
799
800 grub_emu-normal_menu_entry.o: normal/menu_entry.c $(normal/menu_entry.c_DEPENDENCIES)
801 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
802 -include grub_emu-normal_menu_entry.d
803
804 grub_emu-normal_misc.o: normal/misc.c $(normal/misc.c_DEPENDENCIES)
805 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
806 -include grub_emu-normal_misc.d
807
808 grub_emu-normal_script.o: normal/script.c $(normal/script.c_DEPENDENCIES)
809 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
810 -include grub_emu-normal_script.d
811
812 grub_emu-partmap_amiga.o: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES)
813 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
814 -include grub_emu-partmap_amiga.d
815
816 grub_emu-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
817 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
818 -include grub_emu-partmap_apple.d
819
820 grub_emu-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
821 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
822 -include grub_emu-partmap_pc.d
823
824 grub_emu-partmap_sun.o: partmap/sun.c $(partmap/sun.c_DEPENDENCIES)
825 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
826 -include grub_emu-partmap_sun.d
827
828 grub_emu-partmap_acorn.o: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES)
829 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
830 -include grub_emu-partmap_acorn.d
831
832 grub_emu-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
833 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
834 -include grub_emu-partmap_gpt.d
835
836 grub_emu-util_console.o: util/console.c $(util/console.c_DEPENDENCIES)
837 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
838 -include grub_emu-util_console.d
839
840 grub_emu-util_hostfs.o: util/hostfs.c $(util/hostfs.c_DEPENDENCIES)
841 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
842 -include grub_emu-util_hostfs.d
843
844 grub_emu-util_grub_emu.o: util/grub-emu.c $(util/grub-emu.c_DEPENDENCIES)
845 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
846 -include grub_emu-util_grub_emu.d
847
848 grub_emu-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
849 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
850 -include grub_emu-util_misc.d
851
852 grub_emu-util_biosdisk.o: util/biosdisk.c $(util/biosdisk.c_DEPENDENCIES)
853 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
854 -include grub_emu-util_biosdisk.d
855
856 grub_emu-util_getroot.o: util/getroot.c $(util/getroot.c_DEPENDENCIES)
857 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
858 -include grub_emu-util_getroot.d
859
860 grub_emu-util_i386_pc_misc.o: util/i386/pc/misc.c $(util/i386/pc/misc.c_DEPENDENCIES)
861 $(CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
862 -include grub_emu-util_i386_pc_misc.d
863
864 grub_emu-grub_emu_init.o: grub_emu_init.c $(grub_emu_init.c_DEPENDENCIES)
865 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
866 -include grub_emu-grub_emu_init.d
867
868
869 grub_emu_LDFLAGS = $(LIBCURSES)
870
871 # Scripts.
872 sbin_SCRIPTS = grub-install
873 bin_SCRIPTS = grub-mkrescue
874
875 # For grub-install.
876 grub_install_SOURCES = util/i386/pc/grub-install.in
877 CLEANFILES += grub-install
878
879 grub-install: util/i386/pc/grub-install.in config.status
880 ./config.status --file=grub-install:util/i386/pc/grub-install.in
881 chmod +x $@
882
883
884 # For grub-mkrescue.
885 grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
886 CLEANFILES += grub-mkrescue
887
888 grub-mkrescue: util/i386/pc/grub-mkrescue.in config.status
889 ./config.status --file=grub-mkrescue:util/i386/pc/grub-mkrescue.in
890 chmod +x $@
891
892
893 # Modules.
894 pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \
895 _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \
896 vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
897 videotest.mod play.mod bitmap.mod tga.mod cpuid.mod serial.mod ata.mod \
898 vga.mod
899
900 # For biosdisk.mod.
901 biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
902 CLEANFILES += biosdisk.mod mod-biosdisk.o mod-biosdisk.c pre-biosdisk.o biosdisk_mod-disk_i386_pc_biosdisk.o und-biosdisk.lst
903 ifneq ($(biosdisk_mod_EXPORTS),no)
904 CLEANFILES += def-biosdisk.lst
905 DEFSYMFILES += def-biosdisk.lst
906 endif
907 MOSTLYCLEANFILES += biosdisk_mod-disk_i386_pc_biosdisk.d
908 UNDSYMFILES += und-biosdisk.lst
909
910 biosdisk.mod: pre-biosdisk.o mod-biosdisk.o
911 -rm -f $@
912 $(TARGET_CC) $(biosdisk_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
913 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
914
915 pre-biosdisk.o: $(biosdisk_mod_DEPENDENCIES) biosdisk_mod-disk_i386_pc_biosdisk.o
916 -rm -f $@
917 $(TARGET_CC) $(biosdisk_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ biosdisk_mod-disk_i386_pc_biosdisk.o
918
919 mod-biosdisk.o: mod-biosdisk.c
920 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -c -o $@ $<
921
922 mod-biosdisk.c: moddep.lst genmodsrc.sh
923 sh $(srcdir)/genmodsrc.sh 'biosdisk' $< > $@ || (rm -f $@; exit 1)
924
925 ifneq ($(biosdisk_mod_EXPORTS),no)
926 def-biosdisk.lst: pre-biosdisk.o
927 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 biosdisk/' > $@
928 endif
929
930 und-biosdisk.lst: pre-biosdisk.o
931 echo 'biosdisk' > $@
932 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
933
934 biosdisk_mod-disk_i386_pc_biosdisk.o: disk/i386/pc/biosdisk.c
935 $(TARGET_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -MD -c -o $@ $<
936 -include biosdisk_mod-disk_i386_pc_biosdisk.d
937
938 CLEANFILES += cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst fs-biosdisk_mod-disk_i386_pc_biosdisk.lst
939 COMMANDFILES += cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst
940 FSFILES += fs-biosdisk_mod-disk_i386_pc_biosdisk.lst
941
942 cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst: disk/i386/pc/biosdisk.c gencmdlist.sh
943 set -e; $(TARGET_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh biosdisk > $@ || (rm -f $@; exit 1)
944
945 fs-biosdisk_mod-disk_i386_pc_biosdisk.lst: disk/i386/pc/biosdisk.c genfslist.sh
946 set -e; $(TARGET_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh biosdisk > $@ || (rm -f $@; exit 1)
947
948
949 biosdisk_mod_CFLAGS = $(COMMON_CFLAGS)
950 biosdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
951
952 # For _chain.mod.
953 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
954 CLEANFILES += _chain.mod mod-_chain.o mod-_chain.c pre-_chain.o _chain_mod-loader_i386_pc_chainloader.o und-_chain.lst
955 ifneq ($(_chain_mod_EXPORTS),no)
956 CLEANFILES += def-_chain.lst
957 DEFSYMFILES += def-_chain.lst
958 endif
959 MOSTLYCLEANFILES += _chain_mod-loader_i386_pc_chainloader.d
960 UNDSYMFILES += und-_chain.lst
961
962 _chain.mod: pre-_chain.o mod-_chain.o
963 -rm -f $@
964 $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
965 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
966
967 pre-_chain.o: $(_chain_mod_DEPENDENCIES) _chain_mod-loader_i386_pc_chainloader.o
968 -rm -f $@
969 $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ _chain_mod-loader_i386_pc_chainloader.o
970
971 mod-_chain.o: mod-_chain.c
972 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -c -o $@ $<
973
974 mod-_chain.c: moddep.lst genmodsrc.sh
975 sh $(srcdir)/genmodsrc.sh '_chain' $< > $@ || (rm -f $@; exit 1)
976
977 ifneq ($(_chain_mod_EXPORTS),no)
978 def-_chain.lst: pre-_chain.o
979 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _chain/' > $@
980 endif
981
982 und-_chain.lst: pre-_chain.o
983 echo '_chain' > $@
984 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
985
986 _chain_mod-loader_i386_pc_chainloader.o: loader/i386/pc/chainloader.c
987 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -MD -c -o $@ $<
988 -include _chain_mod-loader_i386_pc_chainloader.d
989
990 CLEANFILES += cmd-_chain_mod-loader_i386_pc_chainloader.lst fs-_chain_mod-loader_i386_pc_chainloader.lst
991 COMMANDFILES += cmd-_chain_mod-loader_i386_pc_chainloader.lst
992 FSFILES += fs-_chain_mod-loader_i386_pc_chainloader.lst
993
994 cmd-_chain_mod-loader_i386_pc_chainloader.lst: loader/i386/pc/chainloader.c gencmdlist.sh
995 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _chain > $@ || (rm -f $@; exit 1)
996
997 fs-_chain_mod-loader_i386_pc_chainloader.lst: loader/i386/pc/chainloader.c genfslist.sh
998 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _chain > $@ || (rm -f $@; exit 1)
999
1000
1001 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
1002 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
1003
1004 # For chain.mod.
1005 chain_mod_SOURCES = loader/i386/pc/chainloader_normal.c
1006 CLEANFILES += chain.mod mod-chain.o mod-chain.c pre-chain.o chain_mod-loader_i386_pc_chainloader_normal.o und-chain.lst
1007 ifneq ($(chain_mod_EXPORTS),no)
1008 CLEANFILES += def-chain.lst
1009 DEFSYMFILES += def-chain.lst
1010 endif
1011 MOSTLYCLEANFILES += chain_mod-loader_i386_pc_chainloader_normal.d
1012 UNDSYMFILES += und-chain.lst
1013
1014 chain.mod: pre-chain.o mod-chain.o
1015 -rm -f $@
1016 $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1017 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1018
1019 pre-chain.o: $(chain_mod_DEPENDENCIES) chain_mod-loader_i386_pc_chainloader_normal.o
1020 -rm -f $@
1021 $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ chain_mod-loader_i386_pc_chainloader_normal.o
1022
1023 mod-chain.o: mod-chain.c
1024 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -c -o $@ $<
1025
1026 mod-chain.c: moddep.lst genmodsrc.sh
1027 sh $(srcdir)/genmodsrc.sh 'chain' $< > $@ || (rm -f $@; exit 1)
1028
1029 ifneq ($(chain_mod_EXPORTS),no)
1030 def-chain.lst: pre-chain.o
1031 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 chain/' > $@
1032 endif
1033
1034 und-chain.lst: pre-chain.o
1035 echo 'chain' > $@
1036 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1037
1038 chain_mod-loader_i386_pc_chainloader_normal.o: loader/i386/pc/chainloader_normal.c
1039 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -MD -c -o $@ $<
1040 -include chain_mod-loader_i386_pc_chainloader_normal.d
1041
1042 CLEANFILES += cmd-chain_mod-loader_i386_pc_chainloader_normal.lst fs-chain_mod-loader_i386_pc_chainloader_normal.lst
1043 COMMANDFILES += cmd-chain_mod-loader_i386_pc_chainloader_normal.lst
1044 FSFILES += fs-chain_mod-loader_i386_pc_chainloader_normal.lst
1045
1046 cmd-chain_mod-loader_i386_pc_chainloader_normal.lst: loader/i386/pc/chainloader_normal.c gencmdlist.sh
1047 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh chain > $@ || (rm -f $@; exit 1)
1048
1049 fs-chain_mod-loader_i386_pc_chainloader_normal.lst: loader/i386/pc/chainloader_normal.c genfslist.sh
1050 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh chain > $@ || (rm -f $@; exit 1)
1051
1052
1053 chain_mod_CFLAGS = $(COMMON_CFLAGS)
1054 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
1055
1056 # For _linux.mod.
1057 _linux_mod_SOURCES = loader/i386/pc/linux.c
1058 CLEANFILES += _linux.mod mod-_linux.o mod-_linux.c pre-_linux.o _linux_mod-loader_i386_pc_linux.o und-_linux.lst
1059 ifneq ($(_linux_mod_EXPORTS),no)
1060 CLEANFILES += def-_linux.lst
1061 DEFSYMFILES += def-_linux.lst
1062 endif
1063 MOSTLYCLEANFILES += _linux_mod-loader_i386_pc_linux.d
1064 UNDSYMFILES += und-_linux.lst
1065
1066 _linux.mod: pre-_linux.o mod-_linux.o
1067 -rm -f $@
1068 $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1069 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1070
1071 pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_pc_linux.o
1072 -rm -f $@
1073 $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ _linux_mod-loader_i386_pc_linux.o
1074
1075 mod-_linux.o: mod-_linux.c
1076 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -c -o $@ $<
1077
1078 mod-_linux.c: moddep.lst genmodsrc.sh
1079 sh $(srcdir)/genmodsrc.sh '_linux' $< > $@ || (rm -f $@; exit 1)
1080
1081 ifneq ($(_linux_mod_EXPORTS),no)
1082 def-_linux.lst: pre-_linux.o
1083 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _linux/' > $@
1084 endif
1085
1086 und-_linux.lst: pre-_linux.o
1087 echo '_linux' > $@
1088 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1089
1090 _linux_mod-loader_i386_pc_linux.o: loader/i386/pc/linux.c
1091 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -MD -c -o $@ $<
1092 -include _linux_mod-loader_i386_pc_linux.d
1093
1094 CLEANFILES += cmd-_linux_mod-loader_i386_pc_linux.lst fs-_linux_mod-loader_i386_pc_linux.lst
1095 COMMANDFILES += cmd-_linux_mod-loader_i386_pc_linux.lst
1096 FSFILES += fs-_linux_mod-loader_i386_pc_linux.lst
1097
1098 cmd-_linux_mod-loader_i386_pc_linux.lst: loader/i386/pc/linux.c gencmdlist.sh
1099 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _linux > $@ || (rm -f $@; exit 1)
1100
1101 fs-_linux_mod-loader_i386_pc_linux.lst: loader/i386/pc/linux.c genfslist.sh
1102 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _linux > $@ || (rm -f $@; exit 1)
1103
1104
1105 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
1106 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
1107
1108 # For linux.mod.
1109 linux_mod_SOURCES = loader/i386/pc/linux_normal.c
1110 CLEANFILES += linux.mod mod-linux.o mod-linux.c pre-linux.o linux_mod-loader_i386_pc_linux_normal.o und-linux.lst
1111 ifneq ($(linux_mod_EXPORTS),no)
1112 CLEANFILES += def-linux.lst
1113 DEFSYMFILES += def-linux.lst
1114 endif
1115 MOSTLYCLEANFILES += linux_mod-loader_i386_pc_linux_normal.d
1116 UNDSYMFILES += und-linux.lst
1117
1118 linux.mod: pre-linux.o mod-linux.o
1119 -rm -f $@
1120 $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1121 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1122
1123 pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_pc_linux_normal.o
1124 -rm -f $@
1125 $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ linux_mod-loader_i386_pc_linux_normal.o
1126
1127 mod-linux.o: mod-linux.c
1128 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -c -o $@ $<
1129
1130 mod-linux.c: moddep.lst genmodsrc.sh
1131 sh $(srcdir)/genmodsrc.sh 'linux' $< > $@ || (rm -f $@; exit 1)
1132
1133 ifneq ($(linux_mod_EXPORTS),no)
1134 def-linux.lst: pre-linux.o
1135 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 linux/' > $@
1136 endif
1137
1138 und-linux.lst: pre-linux.o
1139 echo 'linux' > $@
1140 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1141
1142 linux_mod-loader_i386_pc_linux_normal.o: loader/i386/pc/linux_normal.c
1143 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -MD -c -o $@ $<
1144 -include linux_mod-loader_i386_pc_linux_normal.d
1145
1146 CLEANFILES += cmd-linux_mod-loader_i386_pc_linux_normal.lst fs-linux_mod-loader_i386_pc_linux_normal.lst
1147 COMMANDFILES += cmd-linux_mod-loader_i386_pc_linux_normal.lst
1148 FSFILES += fs-linux_mod-loader_i386_pc_linux_normal.lst
1149
1150 cmd-linux_mod-loader_i386_pc_linux_normal.lst: loader/i386/pc/linux_normal.c gencmdlist.sh
1151 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh linux > $@ || (rm -f $@; exit 1)
1152
1153 fs-linux_mod-loader_i386_pc_linux_normal.lst: loader/i386/pc/linux_normal.c genfslist.sh
1154 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh linux > $@ || (rm -f $@; exit 1)
1155
1156
1157 linux_mod_CFLAGS = $(COMMON_CFLAGS)
1158 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
1159
1160 # For normal.mod.
1161 normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
1162 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
1163 normal/completion.c normal/execute.c \
1164 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
1165 normal/menu_entry.c normal/misc.c grub_script.tab.c \
1166 normal/script.c normal/i386/setjmp.S
1167 CLEANFILES += normal.mod mod-normal.o mod-normal.c pre-normal.o normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o und-normal.lst
1168 ifneq ($(normal_mod_EXPORTS),no)
1169 CLEANFILES += def-normal.lst
1170 DEFSYMFILES += def-normal.lst
1171 endif
1172 MOSTLYCLEANFILES += normal_mod-normal_arg.d normal_mod-normal_cmdline.d normal_mod-normal_command.d normal_mod-normal_completion.d normal_mod-normal_execute.d normal_mod-normal_function.d normal_mod-normal_lexer.d normal_mod-normal_main.d normal_mod-normal_menu.d normal_mod-normal_menu_entry.d normal_mod-normal_misc.d normal_mod-grub_script_tab.d normal_mod-normal_script.d normal_mod-normal_i386_setjmp.d
1173 UNDSYMFILES += und-normal.lst
1174
1175 normal.mod: pre-normal.o mod-normal.o
1176 -rm -f $@
1177 $(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1178 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1179
1180 pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o
1181 -rm -f $@
1182 $(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o
1183
1184 mod-normal.o: mod-normal.c
1185 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
1186
1187 mod-normal.c: moddep.lst genmodsrc.sh
1188 sh $(srcdir)/genmodsrc.sh 'normal' $< > $@ || (rm -f $@; exit 1)
1189
1190 ifneq ($(normal_mod_EXPORTS),no)
1191 def-normal.lst: pre-normal.o
1192 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 normal/' > $@
1193 endif
1194
1195 und-normal.lst: pre-normal.o
1196 echo 'normal' > $@
1197 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1198
1199 normal_mod-normal_arg.o: normal/arg.c
1200 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1201 -include normal_mod-normal_arg.d
1202
1203 CLEANFILES += cmd-normal_mod-normal_arg.lst fs-normal_mod-normal_arg.lst
1204 COMMANDFILES += cmd-normal_mod-normal_arg.lst
1205 FSFILES += fs-normal_mod-normal_arg.lst
1206
1207 cmd-normal_mod-normal_arg.lst: normal/arg.c gencmdlist.sh
1208 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1209
1210 fs-normal_mod-normal_arg.lst: normal/arg.c genfslist.sh
1211 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1212
1213
1214 normal_mod-normal_cmdline.o: normal/cmdline.c
1215 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1216 -include normal_mod-normal_cmdline.d
1217
1218 CLEANFILES += cmd-normal_mod-normal_cmdline.lst fs-normal_mod-normal_cmdline.lst
1219 COMMANDFILES += cmd-normal_mod-normal_cmdline.lst
1220 FSFILES += fs-normal_mod-normal_cmdline.lst
1221
1222 cmd-normal_mod-normal_cmdline.lst: normal/cmdline.c gencmdlist.sh
1223 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1224
1225 fs-normal_mod-normal_cmdline.lst: normal/cmdline.c genfslist.sh
1226 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1227
1228
1229 normal_mod-normal_command.o: normal/command.c
1230 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1231 -include normal_mod-normal_command.d
1232
1233 CLEANFILES += cmd-normal_mod-normal_command.lst fs-normal_mod-normal_command.lst
1234 COMMANDFILES += cmd-normal_mod-normal_command.lst
1235 FSFILES += fs-normal_mod-normal_command.lst
1236
1237 cmd-normal_mod-normal_command.lst: normal/command.c gencmdlist.sh
1238 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1239
1240 fs-normal_mod-normal_command.lst: normal/command.c genfslist.sh
1241 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1242
1243
1244 normal_mod-normal_completion.o: normal/completion.c
1245 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1246 -include normal_mod-normal_completion.d
1247
1248 CLEANFILES += cmd-normal_mod-normal_completion.lst fs-normal_mod-normal_completion.lst
1249 COMMANDFILES += cmd-normal_mod-normal_completion.lst
1250 FSFILES += fs-normal_mod-normal_completion.lst
1251
1252 cmd-normal_mod-normal_completion.lst: normal/completion.c gencmdlist.sh
1253 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1254
1255 fs-normal_mod-normal_completion.lst: normal/completion.c genfslist.sh
1256 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1257
1258
1259 normal_mod-normal_execute.o: normal/execute.c
1260 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1261 -include normal_mod-normal_execute.d
1262
1263 CLEANFILES += cmd-normal_mod-normal_execute.lst fs-normal_mod-normal_execute.lst
1264 COMMANDFILES += cmd-normal_mod-normal_execute.lst
1265 FSFILES += fs-normal_mod-normal_execute.lst
1266
1267 cmd-normal_mod-normal_execute.lst: normal/execute.c gencmdlist.sh
1268 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1269
1270 fs-normal_mod-normal_execute.lst: normal/execute.c genfslist.sh
1271 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1272
1273
1274 normal_mod-normal_function.o: normal/function.c
1275 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1276 -include normal_mod-normal_function.d
1277
1278 CLEANFILES += cmd-normal_mod-normal_function.lst fs-normal_mod-normal_function.lst
1279 COMMANDFILES += cmd-normal_mod-normal_function.lst
1280 FSFILES += fs-normal_mod-normal_function.lst
1281
1282 cmd-normal_mod-normal_function.lst: normal/function.c gencmdlist.sh
1283 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1284
1285 fs-normal_mod-normal_function.lst: normal/function.c genfslist.sh
1286 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1287
1288
1289 normal_mod-normal_lexer.o: normal/lexer.c
1290 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1291 -include normal_mod-normal_lexer.d
1292
1293 CLEANFILES += cmd-normal_mod-normal_lexer.lst fs-normal_mod-normal_lexer.lst
1294 COMMANDFILES += cmd-normal_mod-normal_lexer.lst
1295 FSFILES += fs-normal_mod-normal_lexer.lst
1296
1297 cmd-normal_mod-normal_lexer.lst: normal/lexer.c gencmdlist.sh
1298 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1299
1300 fs-normal_mod-normal_lexer.lst: normal/lexer.c genfslist.sh
1301 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1302
1303
1304 normal_mod-normal_main.o: normal/main.c
1305 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1306 -include normal_mod-normal_main.d
1307
1308 CLEANFILES += cmd-normal_mod-normal_main.lst fs-normal_mod-normal_main.lst
1309 COMMANDFILES += cmd-normal_mod-normal_main.lst
1310 FSFILES += fs-normal_mod-normal_main.lst
1311
1312 cmd-normal_mod-normal_main.lst: normal/main.c gencmdlist.sh
1313 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1314
1315 fs-normal_mod-normal_main.lst: normal/main.c genfslist.sh
1316 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1317
1318
1319 normal_mod-normal_menu.o: normal/menu.c
1320 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1321 -include normal_mod-normal_menu.d
1322
1323 CLEANFILES += cmd-normal_mod-normal_menu.lst fs-normal_mod-normal_menu.lst
1324 COMMANDFILES += cmd-normal_mod-normal_menu.lst
1325 FSFILES += fs-normal_mod-normal_menu.lst
1326
1327 cmd-normal_mod-normal_menu.lst: normal/menu.c gencmdlist.sh
1328 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1329
1330 fs-normal_mod-normal_menu.lst: normal/menu.c genfslist.sh
1331 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1332
1333
1334 normal_mod-normal_menu_entry.o: normal/menu_entry.c
1335 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1336 -include normal_mod-normal_menu_entry.d
1337
1338 CLEANFILES += cmd-normal_mod-normal_menu_entry.lst fs-normal_mod-normal_menu_entry.lst
1339 COMMANDFILES += cmd-normal_mod-normal_menu_entry.lst
1340 FSFILES += fs-normal_mod-normal_menu_entry.lst
1341
1342 cmd-normal_mod-normal_menu_entry.lst: normal/menu_entry.c gencmdlist.sh
1343 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1344
1345 fs-normal_mod-normal_menu_entry.lst: normal/menu_entry.c genfslist.sh
1346 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1347
1348
1349 normal_mod-normal_misc.o: normal/misc.c
1350 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1351 -include normal_mod-normal_misc.d
1352
1353 CLEANFILES += cmd-normal_mod-normal_misc.lst fs-normal_mod-normal_misc.lst
1354 COMMANDFILES += cmd-normal_mod-normal_misc.lst
1355 FSFILES += fs-normal_mod-normal_misc.lst
1356
1357 cmd-normal_mod-normal_misc.lst: normal/misc.c gencmdlist.sh
1358 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1359
1360 fs-normal_mod-normal_misc.lst: normal/misc.c genfslist.sh
1361 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1362
1363
1364 normal_mod-grub_script_tab.o: grub_script.tab.c
1365 $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1366 -include normal_mod-grub_script_tab.d
1367
1368 CLEANFILES += cmd-normal_mod-grub_script_tab.lst fs-normal_mod-grub_script_tab.lst
1369 COMMANDFILES += cmd-normal_mod-grub_script_tab.lst
1370 FSFILES += fs-normal_mod-grub_script_tab.lst
1371
1372 cmd-normal_mod-grub_script_tab.lst: grub_script.tab.c gencmdlist.sh
1373 set -e; $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1374
1375 fs-normal_mod-grub_script_tab.lst: grub_script.tab.c genfslist.sh
1376 set -e; $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1377
1378
1379 normal_mod-normal_script.o: normal/script.c
1380 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1381 -include normal_mod-normal_script.d
1382
1383 CLEANFILES += cmd-normal_mod-normal_script.lst fs-normal_mod-normal_script.lst
1384 COMMANDFILES += cmd-normal_mod-normal_script.lst
1385 FSFILES += fs-normal_mod-normal_script.lst
1386
1387 cmd-normal_mod-normal_script.lst: normal/script.c gencmdlist.sh
1388 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1389
1390 fs-normal_mod-normal_script.lst: normal/script.c genfslist.sh
1391 set -e; $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1392
1393
1394 normal_mod-normal_i386_setjmp.o: normal/i386/setjmp.S
1395 $(TARGET_CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(normal_mod_ASFLAGS) -MD -c -o $@ $<
1396 -include normal_mod-normal_i386_setjmp.d
1397
1398 CLEANFILES += cmd-normal_mod-normal_i386_setjmp.lst fs-normal_mod-normal_i386_setjmp.lst
1399 COMMANDFILES += cmd-normal_mod-normal_i386_setjmp.lst
1400 FSFILES += fs-normal_mod-normal_i386_setjmp.lst
1401
1402 cmd-normal_mod-normal_i386_setjmp.lst: normal/i386/setjmp.S gencmdlist.sh
1403 set -e; $(TARGET_CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) $(normal_mod_ASFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1404
1405 fs-normal_mod-normal_i386_setjmp.lst: normal/i386/setjmp.S genfslist.sh
1406 set -e; $(TARGET_CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) $(normal_mod_ASFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1407
1408
1409 normal_mod_CFLAGS = $(COMMON_CFLAGS)
1410 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
1411 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
1412
1413 # For reboot.mod.
1414 reboot_mod_SOURCES = commands/i386/pc/reboot.c
1415 CLEANFILES += reboot.mod mod-reboot.o mod-reboot.c pre-reboot.o reboot_mod-commands_i386_pc_reboot.o und-reboot.lst
1416 ifneq ($(reboot_mod_EXPORTS),no)
1417 CLEANFILES += def-reboot.lst
1418 DEFSYMFILES += def-reboot.lst
1419 endif
1420 MOSTLYCLEANFILES += reboot_mod-commands_i386_pc_reboot.d
1421 UNDSYMFILES += und-reboot.lst
1422
1423 reboot.mod: pre-reboot.o mod-reboot.o
1424 -rm -f $@
1425 $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1426 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1427
1428 pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_i386_pc_reboot.o
1429 -rm -f $@
1430 $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ reboot_mod-commands_i386_pc_reboot.o
1431
1432 mod-reboot.o: mod-reboot.c
1433 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -c -o $@ $<
1434
1435 mod-reboot.c: moddep.lst genmodsrc.sh
1436 sh $(srcdir)/genmodsrc.sh 'reboot' $< > $@ || (rm -f $@; exit 1)
1437
1438 ifneq ($(reboot_mod_EXPORTS),no)
1439 def-reboot.lst: pre-reboot.o
1440 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 reboot/' > $@
1441 endif
1442
1443 und-reboot.lst: pre-reboot.o
1444 echo 'reboot' > $@
1445 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1446
1447 reboot_mod-commands_i386_pc_reboot.o: commands/i386/pc/reboot.c
1448 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -MD -c -o $@ $<
1449 -include reboot_mod-commands_i386_pc_reboot.d
1450
1451 CLEANFILES += cmd-reboot_mod-commands_i386_pc_reboot.lst fs-reboot_mod-commands_i386_pc_reboot.lst
1452 COMMANDFILES += cmd-reboot_mod-commands_i386_pc_reboot.lst
1453 FSFILES += fs-reboot_mod-commands_i386_pc_reboot.lst
1454
1455 cmd-reboot_mod-commands_i386_pc_reboot.lst: commands/i386/pc/reboot.c gencmdlist.sh
1456 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh reboot > $@ || (rm -f $@; exit 1)
1457
1458 fs-reboot_mod-commands_i386_pc_reboot.lst: commands/i386/pc/reboot.c genfslist.sh
1459 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh reboot > $@ || (rm -f $@; exit 1)
1460
1461
1462 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
1463 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1464
1465 # For halt.mod.
1466 halt_mod_SOURCES = commands/i386/pc/halt.c
1467 CLEANFILES += halt.mod mod-halt.o mod-halt.c pre-halt.o halt_mod-commands_i386_pc_halt.o und-halt.lst
1468 ifneq ($(halt_mod_EXPORTS),no)
1469 CLEANFILES += def-halt.lst
1470 DEFSYMFILES += def-halt.lst
1471 endif
1472 MOSTLYCLEANFILES += halt_mod-commands_i386_pc_halt.d
1473 UNDSYMFILES += und-halt.lst
1474
1475 halt.mod: pre-halt.o mod-halt.o
1476 -rm -f $@
1477 $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1478 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1479
1480 pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_i386_pc_halt.o
1481 -rm -f $@
1482 $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ halt_mod-commands_i386_pc_halt.o
1483
1484 mod-halt.o: mod-halt.c
1485 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -c -o $@ $<
1486
1487 mod-halt.c: moddep.lst genmodsrc.sh
1488 sh $(srcdir)/genmodsrc.sh 'halt' $< > $@ || (rm -f $@; exit 1)
1489
1490 ifneq ($(halt_mod_EXPORTS),no)
1491 def-halt.lst: pre-halt.o
1492 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 halt/' > $@
1493 endif
1494
1495 und-halt.lst: pre-halt.o
1496 echo 'halt' > $@
1497 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1498
1499 halt_mod-commands_i386_pc_halt.o: commands/i386/pc/halt.c
1500 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -MD -c -o $@ $<
1501 -include halt_mod-commands_i386_pc_halt.d
1502
1503 CLEANFILES += cmd-halt_mod-commands_i386_pc_halt.lst fs-halt_mod-commands_i386_pc_halt.lst
1504 COMMANDFILES += cmd-halt_mod-commands_i386_pc_halt.lst
1505 FSFILES += fs-halt_mod-commands_i386_pc_halt.lst
1506
1507 cmd-halt_mod-commands_i386_pc_halt.lst: commands/i386/pc/halt.c gencmdlist.sh
1508 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh halt > $@ || (rm -f $@; exit 1)
1509
1510 fs-halt_mod-commands_i386_pc_halt.lst: commands/i386/pc/halt.c genfslist.sh
1511 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh halt > $@ || (rm -f $@; exit 1)
1512
1513
1514 halt_mod_CFLAGS = $(COMMON_CFLAGS)
1515 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
1516
1517 # For serial.mod.
1518 serial_mod_SOURCES = term/i386/pc/serial.c
1519 CLEANFILES += serial.mod mod-serial.o mod-serial.c pre-serial.o serial_mod-term_i386_pc_serial.o und-serial.lst
1520 ifneq ($(serial_mod_EXPORTS),no)
1521 CLEANFILES += def-serial.lst
1522 DEFSYMFILES += def-serial.lst
1523 endif
1524 MOSTLYCLEANFILES += serial_mod-term_i386_pc_serial.d
1525 UNDSYMFILES += und-serial.lst
1526
1527 serial.mod: pre-serial.o mod-serial.o
1528 -rm -f $@
1529 $(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1530 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1531
1532 pre-serial.o: $(serial_mod_DEPENDENCIES) serial_mod-term_i386_pc_serial.o
1533 -rm -f $@
1534 $(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ serial_mod-term_i386_pc_serial.o
1535
1536 mod-serial.o: mod-serial.c
1537 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
1538
1539 mod-serial.c: moddep.lst genmodsrc.sh
1540 sh $(srcdir)/genmodsrc.sh 'serial' $< > $@ || (rm -f $@; exit 1)
1541
1542 ifneq ($(serial_mod_EXPORTS),no)
1543 def-serial.lst: pre-serial.o
1544 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 serial/' > $@
1545 endif
1546
1547 und-serial.lst: pre-serial.o
1548 echo 'serial' > $@
1549 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1550
1551 serial_mod-term_i386_pc_serial.o: term/i386/pc/serial.c
1552 $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -MD -c -o $@ $<
1553 -include serial_mod-term_i386_pc_serial.d
1554
1555 CLEANFILES += cmd-serial_mod-term_i386_pc_serial.lst fs-serial_mod-term_i386_pc_serial.lst
1556 COMMANDFILES += cmd-serial_mod-term_i386_pc_serial.lst
1557 FSFILES += fs-serial_mod-term_i386_pc_serial.lst
1558
1559 cmd-serial_mod-term_i386_pc_serial.lst: term/i386/pc/serial.c gencmdlist.sh
1560 set -e; $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh serial > $@ || (rm -f $@; exit 1)
1561
1562 fs-serial_mod-term_i386_pc_serial.lst: term/i386/pc/serial.c genfslist.sh
1563 set -e; $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh serial > $@ || (rm -f $@; exit 1)
1564
1565
1566 serial_mod_CFLAGS = $(COMMON_CFLAGS)
1567 serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
1568
1569 # For _multiboot.mod.
1570 _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c \
1571 loader/i386/pc/multiboot2.c \
1572 loader/multiboot2.c \
1573 loader/multiboot_loader.c
1574 CLEANFILES += _multiboot.mod mod-_multiboot.o mod-_multiboot.c pre-_multiboot.o _multiboot_mod-loader_i386_pc_multiboot.o _multiboot_mod-loader_i386_pc_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o und-_multiboot.lst
1575 ifneq ($(_multiboot_mod_EXPORTS),no)
1576 CLEANFILES += def-_multiboot.lst
1577 DEFSYMFILES += def-_multiboot.lst
1578 endif
1579 MOSTLYCLEANFILES += _multiboot_mod-loader_i386_pc_multiboot.d _multiboot_mod-loader_i386_pc_multiboot2.d _multiboot_mod-loader_multiboot2.d _multiboot_mod-loader_multiboot_loader.d
1580 UNDSYMFILES += und-_multiboot.lst
1581
1582 _multiboot.mod: pre-_multiboot.o mod-_multiboot.o
1583 -rm -f $@
1584 $(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1585 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1586
1587 pre-_multiboot.o: $(_multiboot_mod_DEPENDENCIES) _multiboot_mod-loader_i386_pc_multiboot.o _multiboot_mod-loader_i386_pc_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o
1588 -rm -f $@
1589 $(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ _multiboot_mod-loader_i386_pc_multiboot.o _multiboot_mod-loader_i386_pc_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o
1590
1591 mod-_multiboot.o: mod-_multiboot.c
1592 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
1593
1594 mod-_multiboot.c: moddep.lst genmodsrc.sh
1595 sh $(srcdir)/genmodsrc.sh '_multiboot' $< > $@ || (rm -f $@; exit 1)
1596
1597 ifneq ($(_multiboot_mod_EXPORTS),no)
1598 def-_multiboot.lst: pre-_multiboot.o
1599 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _multiboot/' > $@
1600 endif
1601
1602 und-_multiboot.lst: pre-_multiboot.o
1603 echo '_multiboot' > $@
1604 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1605
1606 _multiboot_mod-loader_i386_pc_multiboot.o: loader/i386/pc/multiboot.c
1607 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1608 -include _multiboot_mod-loader_i386_pc_multiboot.d
1609
1610 CLEANFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot.lst fs-_multiboot_mod-loader_i386_pc_multiboot.lst
1611 COMMANDFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot.lst
1612 FSFILES += fs-_multiboot_mod-loader_i386_pc_multiboot.lst
1613
1614 cmd-_multiboot_mod-loader_i386_pc_multiboot.lst: loader/i386/pc/multiboot.c gencmdlist.sh
1615 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _multiboot > $@ || (rm -f $@; exit 1)
1616
1617 fs-_multiboot_mod-loader_i386_pc_multiboot.lst: loader/i386/pc/multiboot.c genfslist.sh
1618 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _multiboot > $@ || (rm -f $@; exit 1)
1619
1620
1621 _multiboot_mod-loader_i386_pc_multiboot2.o: loader/i386/pc/multiboot2.c
1622 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1623 -include _multiboot_mod-loader_i386_pc_multiboot2.d
1624
1625 CLEANFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst fs-_multiboot_mod-loader_i386_pc_multiboot2.lst
1626 COMMANDFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst
1627 FSFILES += fs-_multiboot_mod-loader_i386_pc_multiboot2.lst
1628
1629 cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst: loader/i386/pc/multiboot2.c gencmdlist.sh
1630 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _multiboot > $@ || (rm -f $@; exit 1)
1631
1632 fs-_multiboot_mod-loader_i386_pc_multiboot2.lst: loader/i386/pc/multiboot2.c genfslist.sh
1633 set -e; $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _multiboot > $@ || (rm -f $@; exit 1)
1634
1635
1636 _multiboot_mod-loader_multiboot2.o: loader/multiboot2.c
1637 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1638 -include _multiboot_mod-loader_multiboot2.d
1639
1640 CLEANFILES += cmd-_multiboot_mod-loader_multiboot2.lst fs-_multiboot_mod-loader_multiboot2.lst
1641 COMMANDFILES += cmd-_multiboot_mod-loader_multiboot2.lst
1642 FSFILES += fs-_multiboot_mod-loader_multiboot2.lst
1643
1644 cmd-_multiboot_mod-loader_multiboot2.lst: loader/multiboot2.c gencmdlist.sh
1645 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _multiboot > $@ || (rm -f $@; exit 1)
1646
1647 fs-_multiboot_mod-loader_multiboot2.lst: loader/multiboot2.c genfslist.sh
1648 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _multiboot > $@ || (rm -f $@; exit 1)
1649
1650
1651 _multiboot_mod-loader_multiboot_loader.o: loader/multiboot_loader.c
1652 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1653 -include _multiboot_mod-loader_multiboot_loader.d
1654
1655 CLEANFILES += cmd-_multiboot_mod-loader_multiboot_loader.lst fs-_multiboot_mod-loader_multiboot_loader.lst
1656 COMMANDFILES += cmd-_multiboot_mod-loader_multiboot_loader.lst
1657 FSFILES += fs-_multiboot_mod-loader_multiboot_loader.lst
1658
1659 cmd-_multiboot_mod-loader_multiboot_loader.lst: loader/multiboot_loader.c gencmdlist.sh
1660 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh _multiboot > $@ || (rm -f $@; exit 1)
1661
1662 fs-_multiboot_mod-loader_multiboot_loader.lst: loader/multiboot_loader.c genfslist.sh
1663 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh _multiboot > $@ || (rm -f $@; exit 1)
1664
1665
1666 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
1667 _multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1668
1669 # For multiboot.mod.
1670 multiboot_mod_SOURCES = loader/multiboot_loader_normal.c
1671 CLEANFILES += multiboot.mod mod-multiboot.o mod-multiboot.c pre-multiboot.o multiboot_mod-loader_multiboot_loader_normal.o und-multiboot.lst
1672 ifneq ($(multiboot_mod_EXPORTS),no)
1673 CLEANFILES += def-multiboot.lst
1674 DEFSYMFILES += def-multiboot.lst
1675 endif
1676 MOSTLYCLEANFILES += multiboot_mod-loader_multiboot_loader_normal.d
1677 UNDSYMFILES += und-multiboot.lst
1678
1679 multiboot.mod: pre-multiboot.o mod-multiboot.o
1680 -rm -f $@
1681 $(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1682 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1683
1684 pre-multiboot.o: $(multiboot_mod_DEPENDENCIES) multiboot_mod-loader_multiboot_loader_normal.o
1685 -rm -f $@
1686 $(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ multiboot_mod-loader_multiboot_loader_normal.o
1687
1688 mod-multiboot.o: mod-multiboot.c
1689 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -c -o $@ $<
1690
1691 mod-multiboot.c: moddep.lst genmodsrc.sh
1692 sh $(srcdir)/genmodsrc.sh 'multiboot' $< > $@ || (rm -f $@; exit 1)
1693
1694 ifneq ($(multiboot_mod_EXPORTS),no)
1695 def-multiboot.lst: pre-multiboot.o
1696 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 multiboot/' > $@
1697 endif
1698
1699 und-multiboot.lst: pre-multiboot.o
1700 echo 'multiboot' > $@
1701 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1702
1703 multiboot_mod-loader_multiboot_loader_normal.o: loader/multiboot_loader_normal.c
1704 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -MD -c -o $@ $<
1705 -include multiboot_mod-loader_multiboot_loader_normal.d
1706
1707 CLEANFILES += cmd-multiboot_mod-loader_multiboot_loader_normal.lst fs-multiboot_mod-loader_multiboot_loader_normal.lst
1708 COMMANDFILES += cmd-multiboot_mod-loader_multiboot_loader_normal.lst
1709 FSFILES += fs-multiboot_mod-loader_multiboot_loader_normal.lst
1710
1711 cmd-multiboot_mod-loader_multiboot_loader_normal.lst: loader/multiboot_loader_normal.c gencmdlist.sh
1712 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh multiboot > $@ || (rm -f $@; exit 1)
1713
1714 fs-multiboot_mod-loader_multiboot_loader_normal.lst: loader/multiboot_loader_normal.c genfslist.sh
1715 set -e; $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh multiboot > $@ || (rm -f $@; exit 1)
1716
1717
1718 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
1719 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1720
1721 # For vbe.mod.
1722 vbe_mod_SOURCES = video/i386/pc/vbe.c video/i386/pc/vbeblit.c \
1723 video/i386/pc/vbefill.c video/i386/pc/vbeutil.c
1724 CLEANFILES += vbe.mod mod-vbe.o mod-vbe.c pre-vbe.o vbe_mod-video_i386_pc_vbe.o vbe_mod-video_i386_pc_vbeblit.o vbe_mod-video_i386_pc_vbefill.o vbe_mod-video_i386_pc_vbeutil.o und-vbe.lst
1725 ifneq ($(vbe_mod_EXPORTS),no)
1726 CLEANFILES += def-vbe.lst
1727 DEFSYMFILES += def-vbe.lst
1728 endif
1729 MOSTLYCLEANFILES += vbe_mod-video_i386_pc_vbe.d vbe_mod-video_i386_pc_vbeblit.d vbe_mod-video_i386_pc_vbefill.d vbe_mod-video_i386_pc_vbeutil.d
1730 UNDSYMFILES += und-vbe.lst
1731
1732 vbe.mod: pre-vbe.o mod-vbe.o
1733 -rm -f $@
1734 $(TARGET_CC) $(vbe_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1735 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1736
1737 pre-vbe.o: $(vbe_mod_DEPENDENCIES) vbe_mod-video_i386_pc_vbe.o vbe_mod-video_i386_pc_vbeblit.o vbe_mod-video_i386_pc_vbefill.o vbe_mod-video_i386_pc_vbeutil.o
1738 -rm -f $@
1739 $(TARGET_CC) $(vbe_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vbe_mod-video_i386_pc_vbe.o vbe_mod-video_i386_pc_vbeblit.o vbe_mod-video_i386_pc_vbefill.o vbe_mod-video_i386_pc_vbeutil.o
1740
1741 mod-vbe.o: mod-vbe.c
1742 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -c -o $@ $<
1743
1744 mod-vbe.c: moddep.lst genmodsrc.sh
1745 sh $(srcdir)/genmodsrc.sh 'vbe' $< > $@ || (rm -f $@; exit 1)
1746
1747 ifneq ($(vbe_mod_EXPORTS),no)
1748 def-vbe.lst: pre-vbe.o
1749 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbe/' > $@
1750 endif
1751
1752 und-vbe.lst: pre-vbe.o
1753 echo 'vbe' > $@
1754 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1755
1756 vbe_mod-video_i386_pc_vbe.o: video/i386/pc/vbe.c
1757 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1758 -include vbe_mod-video_i386_pc_vbe.d
1759
1760 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbe.lst fs-vbe_mod-video_i386_pc_vbe.lst
1761 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbe.lst
1762 FSFILES += fs-vbe_mod-video_i386_pc_vbe.lst
1763
1764 cmd-vbe_mod-video_i386_pc_vbe.lst: video/i386/pc/vbe.c gencmdlist.sh
1765 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbe > $@ || (rm -f $@; exit 1)
1766
1767 fs-vbe_mod-video_i386_pc_vbe.lst: video/i386/pc/vbe.c genfslist.sh
1768 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbe > $@ || (rm -f $@; exit 1)
1769
1770
1771 vbe_mod-video_i386_pc_vbeblit.o: video/i386/pc/vbeblit.c
1772 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1773 -include vbe_mod-video_i386_pc_vbeblit.d
1774
1775 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbeblit.lst fs-vbe_mod-video_i386_pc_vbeblit.lst
1776 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbeblit.lst
1777 FSFILES += fs-vbe_mod-video_i386_pc_vbeblit.lst
1778
1779 cmd-vbe_mod-video_i386_pc_vbeblit.lst: video/i386/pc/vbeblit.c gencmdlist.sh
1780 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbe > $@ || (rm -f $@; exit 1)
1781
1782 fs-vbe_mod-video_i386_pc_vbeblit.lst: video/i386/pc/vbeblit.c genfslist.sh
1783 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbe > $@ || (rm -f $@; exit 1)
1784
1785
1786 vbe_mod-video_i386_pc_vbefill.o: video/i386/pc/vbefill.c
1787 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1788 -include vbe_mod-video_i386_pc_vbefill.d
1789
1790 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbefill.lst fs-vbe_mod-video_i386_pc_vbefill.lst
1791 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbefill.lst
1792 FSFILES += fs-vbe_mod-video_i386_pc_vbefill.lst
1793
1794 cmd-vbe_mod-video_i386_pc_vbefill.lst: video/i386/pc/vbefill.c gencmdlist.sh
1795 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbe > $@ || (rm -f $@; exit 1)
1796
1797 fs-vbe_mod-video_i386_pc_vbefill.lst: video/i386/pc/vbefill.c genfslist.sh
1798 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbe > $@ || (rm -f $@; exit 1)
1799
1800
1801 vbe_mod-video_i386_pc_vbeutil.o: video/i386/pc/vbeutil.c
1802 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1803 -include vbe_mod-video_i386_pc_vbeutil.d
1804
1805 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbeutil.lst fs-vbe_mod-video_i386_pc_vbeutil.lst
1806 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbeutil.lst
1807 FSFILES += fs-vbe_mod-video_i386_pc_vbeutil.lst
1808
1809 cmd-vbe_mod-video_i386_pc_vbeutil.lst: video/i386/pc/vbeutil.c gencmdlist.sh
1810 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbe > $@ || (rm -f $@; exit 1)
1811
1812 fs-vbe_mod-video_i386_pc_vbeutil.lst: video/i386/pc/vbeutil.c genfslist.sh
1813 set -e; $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbe > $@ || (rm -f $@; exit 1)
1814
1815
1816 vbe_mod_CFLAGS = $(COMMON_CFLAGS)
1817 vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
1818
1819 # For vbeinfo.mod.
1820 vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
1821 CLEANFILES += vbeinfo.mod mod-vbeinfo.o mod-vbeinfo.c pre-vbeinfo.o vbeinfo_mod-commands_i386_pc_vbeinfo.o und-vbeinfo.lst
1822 ifneq ($(vbeinfo_mod_EXPORTS),no)
1823 CLEANFILES += def-vbeinfo.lst
1824 DEFSYMFILES += def-vbeinfo.lst
1825 endif
1826 MOSTLYCLEANFILES += vbeinfo_mod-commands_i386_pc_vbeinfo.d
1827 UNDSYMFILES += und-vbeinfo.lst
1828
1829 vbeinfo.mod: pre-vbeinfo.o mod-vbeinfo.o
1830 -rm -f $@
1831 $(TARGET_CC) $(vbeinfo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1832 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1833
1834 pre-vbeinfo.o: $(vbeinfo_mod_DEPENDENCIES) vbeinfo_mod-commands_i386_pc_vbeinfo.o
1835 -rm -f $@
1836 $(TARGET_CC) $(vbeinfo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vbeinfo_mod-commands_i386_pc_vbeinfo.o
1837
1838 mod-vbeinfo.o: mod-vbeinfo.c
1839 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -c -o $@ $<
1840
1841 mod-vbeinfo.c: moddep.lst genmodsrc.sh
1842 sh $(srcdir)/genmodsrc.sh 'vbeinfo' $< > $@ || (rm -f $@; exit 1)
1843
1844 ifneq ($(vbeinfo_mod_EXPORTS),no)
1845 def-vbeinfo.lst: pre-vbeinfo.o
1846 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbeinfo/' > $@
1847 endif
1848
1849 und-vbeinfo.lst: pre-vbeinfo.o
1850 echo 'vbeinfo' > $@
1851 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1852
1853 vbeinfo_mod-commands_i386_pc_vbeinfo.o: commands/i386/pc/vbeinfo.c
1854 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -MD -c -o $@ $<
1855 -include vbeinfo_mod-commands_i386_pc_vbeinfo.d
1856
1857 CLEANFILES += cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1858 COMMANDFILES += cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1859 FSFILES += fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1860
1861 cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst: commands/i386/pc/vbeinfo.c gencmdlist.sh
1862 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbeinfo > $@ || (rm -f $@; exit 1)
1863
1864 fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst: commands/i386/pc/vbeinfo.c genfslist.sh
1865 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbeinfo > $@ || (rm -f $@; exit 1)
1866
1867
1868 vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
1869 vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
1870
1871 # For vbetest.mod.
1872 vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
1873 CLEANFILES += vbetest.mod mod-vbetest.o mod-vbetest.c pre-vbetest.o vbetest_mod-commands_i386_pc_vbetest.o und-vbetest.lst
1874 ifneq ($(vbetest_mod_EXPORTS),no)
1875 CLEANFILES += def-vbetest.lst
1876 DEFSYMFILES += def-vbetest.lst
1877 endif
1878 MOSTLYCLEANFILES += vbetest_mod-commands_i386_pc_vbetest.d
1879 UNDSYMFILES += und-vbetest.lst
1880
1881 vbetest.mod: pre-vbetest.o mod-vbetest.o
1882 -rm -f $@
1883 $(TARGET_CC) $(vbetest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1884 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1885
1886 pre-vbetest.o: $(vbetest_mod_DEPENDENCIES) vbetest_mod-commands_i386_pc_vbetest.o
1887 -rm -f $@
1888 $(TARGET_CC) $(vbetest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vbetest_mod-commands_i386_pc_vbetest.o
1889
1890 mod-vbetest.o: mod-vbetest.c
1891 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -c -o $@ $<
1892
1893 mod-vbetest.c: moddep.lst genmodsrc.sh
1894 sh $(srcdir)/genmodsrc.sh 'vbetest' $< > $@ || (rm -f $@; exit 1)
1895
1896 ifneq ($(vbetest_mod_EXPORTS),no)
1897 def-vbetest.lst: pre-vbetest.o
1898 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbetest/' > $@
1899 endif
1900
1901 und-vbetest.lst: pre-vbetest.o
1902 echo 'vbetest' > $@
1903 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1904
1905 vbetest_mod-commands_i386_pc_vbetest.o: commands/i386/pc/vbetest.c
1906 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -MD -c -o $@ $<
1907 -include vbetest_mod-commands_i386_pc_vbetest.d
1908
1909 CLEANFILES += cmd-vbetest_mod-commands_i386_pc_vbetest.lst fs-vbetest_mod-commands_i386_pc_vbetest.lst
1910 COMMANDFILES += cmd-vbetest_mod-commands_i386_pc_vbetest.lst
1911 FSFILES += fs-vbetest_mod-commands_i386_pc_vbetest.lst
1912
1913 cmd-vbetest_mod-commands_i386_pc_vbetest.lst: commands/i386/pc/vbetest.c gencmdlist.sh
1914 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vbetest > $@ || (rm -f $@; exit 1)
1915
1916 fs-vbetest_mod-commands_i386_pc_vbetest.lst: commands/i386/pc/vbetest.c genfslist.sh
1917 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vbetest > $@ || (rm -f $@; exit 1)
1918
1919
1920 vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
1921 vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
1922
1923 # For play.mod.
1924 play_mod_SOURCES = commands/i386/pc/play.c
1925 CLEANFILES += play.mod mod-play.o mod-play.c pre-play.o play_mod-commands_i386_pc_play.o und-play.lst
1926 ifneq ($(play_mod_EXPORTS),no)
1927 CLEANFILES += def-play.lst
1928 DEFSYMFILES += def-play.lst
1929 endif
1930 MOSTLYCLEANFILES += play_mod-commands_i386_pc_play.d
1931 UNDSYMFILES += und-play.lst
1932
1933 play.mod: pre-play.o mod-play.o
1934 -rm -f $@
1935 $(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1936 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1937
1938 pre-play.o: $(play_mod_DEPENDENCIES) play_mod-commands_i386_pc_play.o
1939 -rm -f $@
1940 $(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ play_mod-commands_i386_pc_play.o
1941
1942 mod-play.o: mod-play.c
1943 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -c -o $@ $<
1944
1945 mod-play.c: moddep.lst genmodsrc.sh
1946 sh $(srcdir)/genmodsrc.sh 'play' $< > $@ || (rm -f $@; exit 1)
1947
1948 ifneq ($(play_mod_EXPORTS),no)
1949 def-play.lst: pre-play.o
1950 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 play/' > $@
1951 endif
1952
1953 und-play.lst: pre-play.o
1954 echo 'play' > $@
1955 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1956
1957 play_mod-commands_i386_pc_play.o: commands/i386/pc/play.c
1958 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -MD -c -o $@ $<
1959 -include play_mod-commands_i386_pc_play.d
1960
1961 CLEANFILES += cmd-play_mod-commands_i386_pc_play.lst fs-play_mod-commands_i386_pc_play.lst
1962 COMMANDFILES += cmd-play_mod-commands_i386_pc_play.lst
1963 FSFILES += fs-play_mod-commands_i386_pc_play.lst
1964
1965 cmd-play_mod-commands_i386_pc_play.lst: commands/i386/pc/play.c gencmdlist.sh
1966 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh play > $@ || (rm -f $@; exit 1)
1967
1968 fs-play_mod-commands_i386_pc_play.lst: commands/i386/pc/play.c genfslist.sh
1969 set -e; $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh play > $@ || (rm -f $@; exit 1)
1970
1971
1972 play_mod_CFLAGS = $(COMMON_CFLAGS)
1973 play_mod_LDFLAGS = $(COMMON_LDFLAGS)
1974
1975 # For video.mod.
1976 video_mod_SOURCES = video/video.c
1977 CLEANFILES += video.mod mod-video.o mod-video.c pre-video.o video_mod-video_video.o und-video.lst
1978 ifneq ($(video_mod_EXPORTS),no)
1979 CLEANFILES += def-video.lst
1980 DEFSYMFILES += def-video.lst
1981 endif
1982 MOSTLYCLEANFILES += video_mod-video_video.d
1983 UNDSYMFILES += und-video.lst
1984
1985 video.mod: pre-video.o mod-video.o
1986 -rm -f $@
1987 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1988 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1989
1990 pre-video.o: $(video_mod_DEPENDENCIES) video_mod-video_video.o
1991 -rm -f $@
1992 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ video_mod-video_video.o
1993
1994 mod-video.o: mod-video.c
1995 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -c -o $@ $<
1996
1997 mod-video.c: moddep.lst genmodsrc.sh
1998 sh $(srcdir)/genmodsrc.sh 'video' $< > $@ || (rm -f $@; exit 1)
1999
2000 ifneq ($(video_mod_EXPORTS),no)
2001 def-video.lst: pre-video.o
2002 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 video/' > $@
2003 endif
2004
2005 und-video.lst: pre-video.o
2006 echo 'video' > $@
2007 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2008
2009 video_mod-video_video.o: video/video.c
2010 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -MD -c -o $@ $<
2011 -include video_mod-video_video.d
2012
2013 CLEANFILES += cmd-video_mod-video_video.lst fs-video_mod-video_video.lst
2014 COMMANDFILES += cmd-video_mod-video_video.lst
2015 FSFILES += fs-video_mod-video_video.lst
2016
2017 cmd-video_mod-video_video.lst: video/video.c gencmdlist.sh
2018 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh video > $@ || (rm -f $@; exit 1)
2019
2020 fs-video_mod-video_video.lst: video/video.c genfslist.sh
2021 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh video > $@ || (rm -f $@; exit 1)
2022
2023
2024 video_mod_CFLAGS = $(COMMON_CFLAGS)
2025 video_mod_LDFLAGS = $(COMMON_LDFLAGS)
2026
2027 # For gfxterm.mod.
2028 gfxterm_mod_SOURCES = term/gfxterm.c
2029 CLEANFILES += gfxterm.mod mod-gfxterm.o mod-gfxterm.c pre-gfxterm.o gfxterm_mod-term_gfxterm.o und-gfxterm.lst
2030 ifneq ($(gfxterm_mod_EXPORTS),no)
2031 CLEANFILES += def-gfxterm.lst
2032 DEFSYMFILES += def-gfxterm.lst
2033 endif
2034 MOSTLYCLEANFILES += gfxterm_mod-term_gfxterm.d
2035 UNDSYMFILES += und-gfxterm.lst
2036
2037 gfxterm.mod: pre-gfxterm.o mod-gfxterm.o
2038 -rm -f $@
2039 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2040 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2041
2042 pre-gfxterm.o: $(gfxterm_mod_DEPENDENCIES) gfxterm_mod-term_gfxterm.o
2043 -rm -f $@
2044 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ gfxterm_mod-term_gfxterm.o
2045
2046 mod-gfxterm.o: mod-gfxterm.c
2047 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -c -o $@ $<
2048
2049 mod-gfxterm.c: moddep.lst genmodsrc.sh
2050 sh $(srcdir)/genmodsrc.sh 'gfxterm' $< > $@ || (rm -f $@; exit 1)
2051
2052 ifneq ($(gfxterm_mod_EXPORTS),no)
2053 def-gfxterm.lst: pre-gfxterm.o
2054 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 gfxterm/' > $@
2055 endif
2056
2057 und-gfxterm.lst: pre-gfxterm.o
2058 echo 'gfxterm' > $@
2059 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2060
2061 gfxterm_mod-term_gfxterm.o: term/gfxterm.c
2062 $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -MD -c -o $@ $<
2063 -include gfxterm_mod-term_gfxterm.d
2064
2065 CLEANFILES += cmd-gfxterm_mod-term_gfxterm.lst fs-gfxterm_mod-term_gfxterm.lst
2066 COMMANDFILES += cmd-gfxterm_mod-term_gfxterm.lst
2067 FSFILES += fs-gfxterm_mod-term_gfxterm.lst
2068
2069 cmd-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c gencmdlist.sh
2070 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh gfxterm > $@ || (rm -f $@; exit 1)
2071
2072 fs-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c genfslist.sh
2073 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh gfxterm > $@ || (rm -f $@; exit 1)
2074
2075
2076 gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
2077 gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
2078
2079 # For videotest.mod.
2080 videotest_mod_SOURCES = commands/videotest.c
2081 CLEANFILES += videotest.mod mod-videotest.o mod-videotest.c pre-videotest.o videotest_mod-commands_videotest.o und-videotest.lst
2082 ifneq ($(videotest_mod_EXPORTS),no)
2083 CLEANFILES += def-videotest.lst
2084 DEFSYMFILES += def-videotest.lst
2085 endif
2086 MOSTLYCLEANFILES += videotest_mod-commands_videotest.d
2087 UNDSYMFILES += und-videotest.lst
2088
2089 videotest.mod: pre-videotest.o mod-videotest.o
2090 -rm -f $@
2091 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2092 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2093
2094 pre-videotest.o: $(videotest_mod_DEPENDENCIES) videotest_mod-commands_videotest.o
2095 -rm -f $@
2096 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ videotest_mod-commands_videotest.o
2097
2098 mod-videotest.o: mod-videotest.c
2099 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -c -o $@ $<
2100
2101 mod-videotest.c: moddep.lst genmodsrc.sh
2102 sh $(srcdir)/genmodsrc.sh 'videotest' $< > $@ || (rm -f $@; exit 1)
2103
2104 ifneq ($(videotest_mod_EXPORTS),no)
2105 def-videotest.lst: pre-videotest.o
2106 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 videotest/' > $@
2107 endif
2108
2109 und-videotest.lst: pre-videotest.o
2110 echo 'videotest' > $@
2111 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2112
2113 videotest_mod-commands_videotest.o: commands/videotest.c
2114 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -MD -c -o $@ $<
2115 -include videotest_mod-commands_videotest.d
2116
2117 CLEANFILES += cmd-videotest_mod-commands_videotest.lst fs-videotest_mod-commands_videotest.lst
2118 COMMANDFILES += cmd-videotest_mod-commands_videotest.lst
2119 FSFILES += fs-videotest_mod-commands_videotest.lst
2120
2121 cmd-videotest_mod-commands_videotest.lst: commands/videotest.c gencmdlist.sh
2122 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh videotest > $@ || (rm -f $@; exit 1)
2123
2124 fs-videotest_mod-commands_videotest.lst: commands/videotest.c genfslist.sh
2125 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh videotest > $@ || (rm -f $@; exit 1)
2126
2127
2128 videotest_mod_CFLAGS = $(COMMON_CFLAGS)
2129 videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
2130
2131 # For bitmap.mod
2132 bitmap_mod_SOURCES = video/bitmap.c
2133 CLEANFILES += bitmap.mod mod-bitmap.o mod-bitmap.c pre-bitmap.o bitmap_mod-video_bitmap.o und-bitmap.lst
2134 ifneq ($(bitmap_mod_EXPORTS),no)
2135 CLEANFILES += def-bitmap.lst
2136 DEFSYMFILES += def-bitmap.lst
2137 endif
2138 MOSTLYCLEANFILES += bitmap_mod-video_bitmap.d
2139 UNDSYMFILES += und-bitmap.lst
2140
2141 bitmap.mod: pre-bitmap.o mod-bitmap.o
2142 -rm -f $@
2143 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2144 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2145
2146 pre-bitmap.o: $(bitmap_mod_DEPENDENCIES) bitmap_mod-video_bitmap.o
2147 -rm -f $@
2148 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ bitmap_mod-video_bitmap.o
2149
2150 mod-bitmap.o: mod-bitmap.c
2151 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -c -o $@ $<
2152
2153 mod-bitmap.c: moddep.lst genmodsrc.sh
2154 sh $(srcdir)/genmodsrc.sh 'bitmap' $< > $@ || (rm -f $@; exit 1)
2155
2156 ifneq ($(bitmap_mod_EXPORTS),no)
2157 def-bitmap.lst: pre-bitmap.o
2158 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 bitmap/' > $@
2159 endif
2160
2161 und-bitmap.lst: pre-bitmap.o
2162 echo 'bitmap' > $@
2163 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2164
2165 bitmap_mod-video_bitmap.o: video/bitmap.c
2166 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -MD -c -o $@ $<
2167 -include bitmap_mod-video_bitmap.d
2168
2169 CLEANFILES += cmd-bitmap_mod-video_bitmap.lst fs-bitmap_mod-video_bitmap.lst
2170 COMMANDFILES += cmd-bitmap_mod-video_bitmap.lst
2171 FSFILES += fs-bitmap_mod-video_bitmap.lst
2172
2173 cmd-bitmap_mod-video_bitmap.lst: video/bitmap.c gencmdlist.sh
2174 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh bitmap > $@ || (rm -f $@; exit 1)
2175
2176 fs-bitmap_mod-video_bitmap.lst: video/bitmap.c genfslist.sh
2177 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh bitmap > $@ || (rm -f $@; exit 1)
2178
2179
2180 bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
2181 bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
2182
2183 # For tga.mod
2184 tga_mod_SOURCES = video/readers/tga.c
2185 CLEANFILES += tga.mod mod-tga.o mod-tga.c pre-tga.o tga_mod-video_readers_tga.o und-tga.lst
2186 ifneq ($(tga_mod_EXPORTS),no)
2187 CLEANFILES += def-tga.lst
2188 DEFSYMFILES += def-tga.lst
2189 endif
2190 MOSTLYCLEANFILES += tga_mod-video_readers_tga.d
2191 UNDSYMFILES += und-tga.lst
2192
2193 tga.mod: pre-tga.o mod-tga.o
2194 -rm -f $@
2195 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2196 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2197
2198 pre-tga.o: $(tga_mod_DEPENDENCIES) tga_mod-video_readers_tga.o
2199 -rm -f $@
2200 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ tga_mod-video_readers_tga.o
2201
2202 mod-tga.o: mod-tga.c
2203 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -c -o $@ $<
2204
2205 mod-tga.c: moddep.lst genmodsrc.sh
2206 sh $(srcdir)/genmodsrc.sh 'tga' $< > $@ || (rm -f $@; exit 1)
2207
2208 ifneq ($(tga_mod_EXPORTS),no)
2209 def-tga.lst: pre-tga.o
2210 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 tga/' > $@
2211 endif
2212
2213 und-tga.lst: pre-tga.o
2214 echo 'tga' > $@
2215 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2216
2217 tga_mod-video_readers_tga.o: video/readers/tga.c
2218 $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -MD -c -o $@ $<
2219 -include tga_mod-video_readers_tga.d
2220
2221 CLEANFILES += cmd-tga_mod-video_readers_tga.lst fs-tga_mod-video_readers_tga.lst
2222 COMMANDFILES += cmd-tga_mod-video_readers_tga.lst
2223 FSFILES += fs-tga_mod-video_readers_tga.lst
2224
2225 cmd-tga_mod-video_readers_tga.lst: video/readers/tga.c gencmdlist.sh
2226 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh tga > $@ || (rm -f $@; exit 1)
2227
2228 fs-tga_mod-video_readers_tga.lst: video/readers/tga.c genfslist.sh
2229 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh tga > $@ || (rm -f $@; exit 1)
2230
2231
2232 tga_mod_CFLAGS = $(COMMON_CFLAGS)
2233 tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
2234
2235 # For cpuid.mod.
2236 cpuid_mod_SOURCES = commands/i386/cpuid.c
2237 CLEANFILES += cpuid.mod mod-cpuid.o mod-cpuid.c pre-cpuid.o cpuid_mod-commands_i386_cpuid.o und-cpuid.lst
2238 ifneq ($(cpuid_mod_EXPORTS),no)
2239 CLEANFILES += def-cpuid.lst
2240 DEFSYMFILES += def-cpuid.lst
2241 endif
2242 MOSTLYCLEANFILES += cpuid_mod-commands_i386_cpuid.d
2243 UNDSYMFILES += und-cpuid.lst
2244
2245 cpuid.mod: pre-cpuid.o mod-cpuid.o
2246 -rm -f $@
2247 $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2248 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2249
2250 pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
2251 -rm -f $@
2252 $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ cpuid_mod-commands_i386_cpuid.o
2253
2254 mod-cpuid.o: mod-cpuid.c
2255 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -c -o $@ $<
2256
2257 mod-cpuid.c: moddep.lst genmodsrc.sh
2258 sh $(srcdir)/genmodsrc.sh 'cpuid' $< > $@ || (rm -f $@; exit 1)
2259
2260 ifneq ($(cpuid_mod_EXPORTS),no)
2261 def-cpuid.lst: pre-cpuid.o
2262 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cpuid/' > $@
2263 endif
2264
2265 und-cpuid.lst: pre-cpuid.o
2266 echo 'cpuid' > $@
2267 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2268
2269 cpuid_mod-commands_i386_cpuid.o: commands/i386/cpuid.c
2270 $(TARGET_CC) -Icommands/i386 -I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -MD -c -o $@ $<
2271 -include cpuid_mod-commands_i386_cpuid.d
2272
2273 CLEANFILES += cmd-cpuid_mod-commands_i386_cpuid.lst fs-cpuid_mod-commands_i386_cpuid.lst
2274 COMMANDFILES += cmd-cpuid_mod-commands_i386_cpuid.lst
2275 FSFILES += fs-cpuid_mod-commands_i386_cpuid.lst
2276
2277 cmd-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c gencmdlist.sh
2278 set -e; $(TARGET_CC) -Icommands/i386 -I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh cpuid > $@ || (rm -f $@; exit 1)
2279
2280 fs-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c genfslist.sh
2281 set -e; $(TARGET_CC) -Icommands/i386 -I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh cpuid > $@ || (rm -f $@; exit 1)
2282
2283
2284 cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
2285 cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
2286
2287 # For ata.mod.
2288 ata_mod_SOURCES = disk/ata.c
2289 CLEANFILES += ata.mod mod-ata.o mod-ata.c pre-ata.o ata_mod-disk_ata.o und-ata.lst
2290 ifneq ($(ata_mod_EXPORTS),no)
2291 CLEANFILES += def-ata.lst
2292 DEFSYMFILES += def-ata.lst
2293 endif
2294 MOSTLYCLEANFILES += ata_mod-disk_ata.d
2295 UNDSYMFILES += und-ata.lst
2296
2297 ata.mod: pre-ata.o mod-ata.o
2298 -rm -f $@
2299 $(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2300 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2301
2302 pre-ata.o: $(ata_mod_DEPENDENCIES) ata_mod-disk_ata.o
2303 -rm -f $@
2304 $(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ata_mod-disk_ata.o
2305
2306 mod-ata.o: mod-ata.c
2307 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -c -o $@ $<
2308
2309 mod-ata.c: moddep.lst genmodsrc.sh
2310 sh $(srcdir)/genmodsrc.sh 'ata' $< > $@ || (rm -f $@; exit 1)
2311
2312 ifneq ($(ata_mod_EXPORTS),no)
2313 def-ata.lst: pre-ata.o
2314 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ata/' > $@
2315 endif
2316
2317 und-ata.lst: pre-ata.o
2318 echo 'ata' > $@
2319 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2320
2321 ata_mod-disk_ata.o: disk/ata.c
2322 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -MD -c -o $@ $<
2323 -include ata_mod-disk_ata.d
2324
2325 CLEANFILES += cmd-ata_mod-disk_ata.lst fs-ata_mod-disk_ata.lst
2326 COMMANDFILES += cmd-ata_mod-disk_ata.lst
2327 FSFILES += fs-ata_mod-disk_ata.lst
2328
2329 cmd-ata_mod-disk_ata.lst: disk/ata.c gencmdlist.sh
2330 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ata > $@ || (rm -f $@; exit 1)
2331
2332 fs-ata_mod-disk_ata.lst: disk/ata.c genfslist.sh
2333 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ata > $@ || (rm -f $@; exit 1)
2334
2335
2336 ata_mod_CFLAGS = $(COMMON_CFLAGS)
2337 ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
2338
2339 # For vga.mod.
2340 vga_mod_SOURCES = term/i386/pc/vga.c
2341 CLEANFILES += vga.mod mod-vga.o mod-vga.c pre-vga.o vga_mod-term_i386_pc_vga.o und-vga.lst
2342 ifneq ($(vga_mod_EXPORTS),no)
2343 CLEANFILES += def-vga.lst
2344 DEFSYMFILES += def-vga.lst
2345 endif
2346 MOSTLYCLEANFILES += vga_mod-term_i386_pc_vga.d
2347 UNDSYMFILES += und-vga.lst
2348
2349 vga.mod: pre-vga.o mod-vga.o
2350 -rm -f $@
2351 $(TARGET_CC) $(vga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2352 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2353
2354 pre-vga.o: $(vga_mod_DEPENDENCIES) vga_mod-term_i386_pc_vga.o
2355 -rm -f $@
2356 $(TARGET_CC) $(vga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vga_mod-term_i386_pc_vga.o
2357
2358 mod-vga.o: mod-vga.c
2359 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $<
2360
2361 mod-vga.c: moddep.lst genmodsrc.sh
2362 sh $(srcdir)/genmodsrc.sh 'vga' $< > $@ || (rm -f $@; exit 1)
2363
2364 ifneq ($(vga_mod_EXPORTS),no)
2365 def-vga.lst: pre-vga.o
2366 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vga/' > $@
2367 endif
2368
2369 und-vga.lst: pre-vga.o
2370 echo 'vga' > $@
2371 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2372
2373 vga_mod-term_i386_pc_vga.o: term/i386/pc/vga.c
2374 $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -MD -c -o $@ $<
2375 -include vga_mod-term_i386_pc_vga.d
2376
2377 CLEANFILES += cmd-vga_mod-term_i386_pc_vga.lst fs-vga_mod-term_i386_pc_vga.lst
2378 COMMANDFILES += cmd-vga_mod-term_i386_pc_vga.lst
2379 FSFILES += fs-vga_mod-term_i386_pc_vga.lst
2380
2381 cmd-vga_mod-term_i386_pc_vga.lst: term/i386/pc/vga.c gencmdlist.sh
2382 set -e; $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh vga > $@ || (rm -f $@; exit 1)
2383
2384 fs-vga_mod-term_i386_pc_vga.lst: term/i386/pc/vga.c genfslist.sh
2385 set -e; $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh vga > $@ || (rm -f $@; exit 1)
2386
2387
2388 vga_mod_CFLAGS = $(COMMON_CFLAGS)
2389 vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
2390
2391 include $(srcdir)/conf/common.mk