]> git.proxmox.com Git - grub2.git/blob - conf/i386-pc.mk
2007-12-26 Bean <bean123ch@gmail.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 fs/cpio.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-fs_cpio.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-fs_cpio.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-fs_cpio.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-fs_cpio.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-fs_cpio.o: fs/cpio.c $(fs/cpio.c_DEPENDENCIES)
697 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
698 -include grub_emu-fs_cpio.d
699
700 grub_emu-io_gzio.o: io/gzio.c $(io/gzio.c_DEPENDENCIES)
701 $(CC) -Iio -I$(srcdir)/io $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
702 -include grub_emu-io_gzio.d
703
704 grub_emu-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
705 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
706 -include grub_emu-kern_device.d
707
708 grub_emu-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
709 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
710 -include grub_emu-kern_disk.d
711
712 grub_emu-kern_dl.o: kern/dl.c $(kern/dl.c_DEPENDENCIES)
713 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
714 -include grub_emu-kern_dl.d
715
716 grub_emu-kern_elf.o: kern/elf.c $(kern/elf.c_DEPENDENCIES)
717 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
718 -include grub_emu-kern_elf.d
719
720 grub_emu-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
721 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
722 -include grub_emu-kern_env.d
723
724 grub_emu-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
725 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
726 -include grub_emu-kern_err.d
727
728 grub_emu-normal_execute.o: normal/execute.c $(normal/execute.c_DEPENDENCIES)
729 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
730 -include grub_emu-normal_execute.d
731
732 grub_emu-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
733 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
734 -include grub_emu-kern_file.d
735
736 grub_emu-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
737 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
738 -include grub_emu-kern_fs.d
739
740 grub_emu-normal_lexer.o: normal/lexer.c $(normal/lexer.c_DEPENDENCIES)
741 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
742 -include grub_emu-normal_lexer.d
743
744 grub_emu-kern_loader.o: kern/loader.c $(kern/loader.c_DEPENDENCIES)
745 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
746 -include grub_emu-kern_loader.d
747
748 grub_emu-kern_main.o: kern/main.c $(kern/main.c_DEPENDENCIES)
749 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
750 -include grub_emu-kern_main.d
751
752 grub_emu-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
753 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
754 -include grub_emu-kern_misc.d
755
756 grub_emu-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
757 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
758 -include grub_emu-kern_parser.d
759
760 grub_emu-grub_script_tab.o: grub_script.tab.c $(grub_script.tab.c_DEPENDENCIES)
761 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
762 -include grub_emu-grub_script_tab.d
763
764 grub_emu-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
765 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
766 -include grub_emu-kern_partition.d
767
768 grub_emu-kern_rescue.o: kern/rescue.c $(kern/rescue.c_DEPENDENCIES)
769 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
770 -include grub_emu-kern_rescue.d
771
772 grub_emu-kern_term.o: kern/term.c $(kern/term.c_DEPENDENCIES)
773 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
774 -include grub_emu-kern_term.d
775
776 grub_emu-normal_arg.o: normal/arg.c $(normal/arg.c_DEPENDENCIES)
777 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
778 -include grub_emu-normal_arg.d
779
780 grub_emu-normal_cmdline.o: normal/cmdline.c $(normal/cmdline.c_DEPENDENCIES)
781 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
782 -include grub_emu-normal_cmdline.d
783
784 grub_emu-normal_command.o: normal/command.c $(normal/command.c_DEPENDENCIES)
785 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
786 -include grub_emu-normal_command.d
787
788 grub_emu-normal_function.o: normal/function.c $(normal/function.c_DEPENDENCIES)
789 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
790 -include grub_emu-normal_function.d
791
792 grub_emu-normal_completion.o: normal/completion.c $(normal/completion.c_DEPENDENCIES)
793 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
794 -include grub_emu-normal_completion.d
795
796 grub_emu-normal_main.o: normal/main.c $(normal/main.c_DEPENDENCIES)
797 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
798 -include grub_emu-normal_main.d
799
800 grub_emu-normal_menu.o: normal/menu.c $(normal/menu.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.d
803
804 grub_emu-normal_menu_entry.o: normal/menu_entry.c $(normal/menu_entry.c_DEPENDENCIES)
805 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
806 -include grub_emu-normal_menu_entry.d
807
808 grub_emu-normal_misc.o: normal/misc.c $(normal/misc.c_DEPENDENCIES)
809 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
810 -include grub_emu-normal_misc.d
811
812 grub_emu-normal_script.o: normal/script.c $(normal/script.c_DEPENDENCIES)
813 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
814 -include grub_emu-normal_script.d
815
816 grub_emu-partmap_amiga.o: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES)
817 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
818 -include grub_emu-partmap_amiga.d
819
820 grub_emu-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
821 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
822 -include grub_emu-partmap_apple.d
823
824 grub_emu-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
825 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
826 -include grub_emu-partmap_pc.d
827
828 grub_emu-partmap_sun.o: partmap/sun.c $(partmap/sun.c_DEPENDENCIES)
829 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
830 -include grub_emu-partmap_sun.d
831
832 grub_emu-partmap_acorn.o: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES)
833 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
834 -include grub_emu-partmap_acorn.d
835
836 grub_emu-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
837 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
838 -include grub_emu-partmap_gpt.d
839
840 grub_emu-util_console.o: util/console.c $(util/console.c_DEPENDENCIES)
841 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
842 -include grub_emu-util_console.d
843
844 grub_emu-util_hostfs.o: util/hostfs.c $(util/hostfs.c_DEPENDENCIES)
845 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
846 -include grub_emu-util_hostfs.d
847
848 grub_emu-util_grub_emu.o: util/grub-emu.c $(util/grub-emu.c_DEPENDENCIES)
849 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
850 -include grub_emu-util_grub_emu.d
851
852 grub_emu-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
853 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
854 -include grub_emu-util_misc.d
855
856 grub_emu-util_biosdisk.o: util/biosdisk.c $(util/biosdisk.c_DEPENDENCIES)
857 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
858 -include grub_emu-util_biosdisk.d
859
860 grub_emu-util_getroot.o: util/getroot.c $(util/getroot.c_DEPENDENCIES)
861 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
862 -include grub_emu-util_getroot.d
863
864 grub_emu-util_i386_pc_misc.o: util/i386/pc/misc.c $(util/i386/pc/misc.c_DEPENDENCIES)
865 $(CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
866 -include grub_emu-util_i386_pc_misc.d
867
868 grub_emu-grub_emu_init.o: grub_emu_init.c $(grub_emu_init.c_DEPENDENCIES)
869 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
870 -include grub_emu-grub_emu_init.d
871
872
873 grub_emu_LDFLAGS = $(LIBCURSES)
874
875 # Scripts.
876 sbin_SCRIPTS = grub-install
877 bin_SCRIPTS = grub-mkrescue
878
879 # For grub-install.
880 grub_install_SOURCES = util/i386/pc/grub-install.in
881 CLEANFILES += grub-install
882
883 grub-install: util/i386/pc/grub-install.in config.status
884 ./config.status --file=grub-install:util/i386/pc/grub-install.in
885 chmod +x $@
886
887
888 # For grub-mkrescue.
889 grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
890 CLEANFILES += grub-mkrescue
891
892 grub-mkrescue: util/i386/pc/grub-mkrescue.in config.status
893 ./config.status --file=grub-mkrescue:util/i386/pc/grub-mkrescue.in
894 chmod +x $@
895
896
897 # Modules.
898 pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \
899 _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \
900 vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
901 videotest.mod play.mod bitmap.mod tga.mod cpuid.mod serial.mod ata.mod \
902 vga.mod
903
904 # For biosdisk.mod.
905 biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
906 CLEANFILES += biosdisk.mod mod-biosdisk.o mod-biosdisk.c pre-biosdisk.o biosdisk_mod-disk_i386_pc_biosdisk.o und-biosdisk.lst
907 ifneq ($(biosdisk_mod_EXPORTS),no)
908 CLEANFILES += def-biosdisk.lst
909 DEFSYMFILES += def-biosdisk.lst
910 endif
911 MOSTLYCLEANFILES += biosdisk_mod-disk_i386_pc_biosdisk.d
912 UNDSYMFILES += und-biosdisk.lst
913
914 biosdisk.mod: pre-biosdisk.o mod-biosdisk.o
915 -rm -f $@
916 $(TARGET_CC) $(biosdisk_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
917 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
918
919 pre-biosdisk.o: $(biosdisk_mod_DEPENDENCIES) biosdisk_mod-disk_i386_pc_biosdisk.o
920 -rm -f $@
921 $(TARGET_CC) $(biosdisk_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ biosdisk_mod-disk_i386_pc_biosdisk.o
922
923 mod-biosdisk.o: mod-biosdisk.c
924 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -c -o $@ $<
925
926 mod-biosdisk.c: moddep.lst genmodsrc.sh
927 sh $(srcdir)/genmodsrc.sh 'biosdisk' $< > $@ || (rm -f $@; exit 1)
928
929 ifneq ($(biosdisk_mod_EXPORTS),no)
930 def-biosdisk.lst: pre-biosdisk.o
931 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 biosdisk/' > $@
932 endif
933
934 und-biosdisk.lst: pre-biosdisk.o
935 echo 'biosdisk' > $@
936 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
937
938 biosdisk_mod-disk_i386_pc_biosdisk.o: disk/i386/pc/biosdisk.c
939 $(TARGET_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(biosdisk_mod_CFLAGS) -MD -c -o $@ $<
940 -include biosdisk_mod-disk_i386_pc_biosdisk.d
941
942 CLEANFILES += cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst fs-biosdisk_mod-disk_i386_pc_biosdisk.lst
943 COMMANDFILES += cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst
944 FSFILES += fs-biosdisk_mod-disk_i386_pc_biosdisk.lst
945
946 cmd-biosdisk_mod-disk_i386_pc_biosdisk.lst: disk/i386/pc/biosdisk.c gencmdlist.sh
947 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)
948
949 fs-biosdisk_mod-disk_i386_pc_biosdisk.lst: disk/i386/pc/biosdisk.c genfslist.sh
950 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)
951
952
953 biosdisk_mod_CFLAGS = $(COMMON_CFLAGS)
954 biosdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
955
956 # For _chain.mod.
957 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
958 CLEANFILES += _chain.mod mod-_chain.o mod-_chain.c pre-_chain.o _chain_mod-loader_i386_pc_chainloader.o und-_chain.lst
959 ifneq ($(_chain_mod_EXPORTS),no)
960 CLEANFILES += def-_chain.lst
961 DEFSYMFILES += def-_chain.lst
962 endif
963 MOSTLYCLEANFILES += _chain_mod-loader_i386_pc_chainloader.d
964 UNDSYMFILES += und-_chain.lst
965
966 _chain.mod: pre-_chain.o mod-_chain.o
967 -rm -f $@
968 $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
969 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
970
971 pre-_chain.o: $(_chain_mod_DEPENDENCIES) _chain_mod-loader_i386_pc_chainloader.o
972 -rm -f $@
973 $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ _chain_mod-loader_i386_pc_chainloader.o
974
975 mod-_chain.o: mod-_chain.c
976 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -c -o $@ $<
977
978 mod-_chain.c: moddep.lst genmodsrc.sh
979 sh $(srcdir)/genmodsrc.sh '_chain' $< > $@ || (rm -f $@; exit 1)
980
981 ifneq ($(_chain_mod_EXPORTS),no)
982 def-_chain.lst: pre-_chain.o
983 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _chain/' > $@
984 endif
985
986 und-_chain.lst: pre-_chain.o
987 echo '_chain' > $@
988 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
989
990 _chain_mod-loader_i386_pc_chainloader.o: loader/i386/pc/chainloader.c
991 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -MD -c -o $@ $<
992 -include _chain_mod-loader_i386_pc_chainloader.d
993
994 CLEANFILES += cmd-_chain_mod-loader_i386_pc_chainloader.lst fs-_chain_mod-loader_i386_pc_chainloader.lst
995 COMMANDFILES += cmd-_chain_mod-loader_i386_pc_chainloader.lst
996 FSFILES += fs-_chain_mod-loader_i386_pc_chainloader.lst
997
998 cmd-_chain_mod-loader_i386_pc_chainloader.lst: loader/i386/pc/chainloader.c gencmdlist.sh
999 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)
1000
1001 fs-_chain_mod-loader_i386_pc_chainloader.lst: loader/i386/pc/chainloader.c genfslist.sh
1002 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)
1003
1004
1005 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
1006 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
1007
1008 # For chain.mod.
1009 chain_mod_SOURCES = loader/i386/pc/chainloader_normal.c
1010 CLEANFILES += chain.mod mod-chain.o mod-chain.c pre-chain.o chain_mod-loader_i386_pc_chainloader_normal.o und-chain.lst
1011 ifneq ($(chain_mod_EXPORTS),no)
1012 CLEANFILES += def-chain.lst
1013 DEFSYMFILES += def-chain.lst
1014 endif
1015 MOSTLYCLEANFILES += chain_mod-loader_i386_pc_chainloader_normal.d
1016 UNDSYMFILES += und-chain.lst
1017
1018 chain.mod: pre-chain.o mod-chain.o
1019 -rm -f $@
1020 $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1021 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1022
1023 pre-chain.o: $(chain_mod_DEPENDENCIES) chain_mod-loader_i386_pc_chainloader_normal.o
1024 -rm -f $@
1025 $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ chain_mod-loader_i386_pc_chainloader_normal.o
1026
1027 mod-chain.o: mod-chain.c
1028 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -c -o $@ $<
1029
1030 mod-chain.c: moddep.lst genmodsrc.sh
1031 sh $(srcdir)/genmodsrc.sh 'chain' $< > $@ || (rm -f $@; exit 1)
1032
1033 ifneq ($(chain_mod_EXPORTS),no)
1034 def-chain.lst: pre-chain.o
1035 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 chain/' > $@
1036 endif
1037
1038 und-chain.lst: pre-chain.o
1039 echo 'chain' > $@
1040 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1041
1042 chain_mod-loader_i386_pc_chainloader_normal.o: loader/i386/pc/chainloader_normal.c
1043 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -MD -c -o $@ $<
1044 -include chain_mod-loader_i386_pc_chainloader_normal.d
1045
1046 CLEANFILES += cmd-chain_mod-loader_i386_pc_chainloader_normal.lst fs-chain_mod-loader_i386_pc_chainloader_normal.lst
1047 COMMANDFILES += cmd-chain_mod-loader_i386_pc_chainloader_normal.lst
1048 FSFILES += fs-chain_mod-loader_i386_pc_chainloader_normal.lst
1049
1050 cmd-chain_mod-loader_i386_pc_chainloader_normal.lst: loader/i386/pc/chainloader_normal.c gencmdlist.sh
1051 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)
1052
1053 fs-chain_mod-loader_i386_pc_chainloader_normal.lst: loader/i386/pc/chainloader_normal.c genfslist.sh
1054 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)
1055
1056
1057 chain_mod_CFLAGS = $(COMMON_CFLAGS)
1058 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
1059
1060 # For _linux.mod.
1061 _linux_mod_SOURCES = loader/i386/pc/linux.c
1062 CLEANFILES += _linux.mod mod-_linux.o mod-_linux.c pre-_linux.o _linux_mod-loader_i386_pc_linux.o und-_linux.lst
1063 ifneq ($(_linux_mod_EXPORTS),no)
1064 CLEANFILES += def-_linux.lst
1065 DEFSYMFILES += def-_linux.lst
1066 endif
1067 MOSTLYCLEANFILES += _linux_mod-loader_i386_pc_linux.d
1068 UNDSYMFILES += und-_linux.lst
1069
1070 _linux.mod: pre-_linux.o mod-_linux.o
1071 -rm -f $@
1072 $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1073 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1074
1075 pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_pc_linux.o
1076 -rm -f $@
1077 $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ _linux_mod-loader_i386_pc_linux.o
1078
1079 mod-_linux.o: mod-_linux.c
1080 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -c -o $@ $<
1081
1082 mod-_linux.c: moddep.lst genmodsrc.sh
1083 sh $(srcdir)/genmodsrc.sh '_linux' $< > $@ || (rm -f $@; exit 1)
1084
1085 ifneq ($(_linux_mod_EXPORTS),no)
1086 def-_linux.lst: pre-_linux.o
1087 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _linux/' > $@
1088 endif
1089
1090 und-_linux.lst: pre-_linux.o
1091 echo '_linux' > $@
1092 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1093
1094 _linux_mod-loader_i386_pc_linux.o: loader/i386/pc/linux.c
1095 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -MD -c -o $@ $<
1096 -include _linux_mod-loader_i386_pc_linux.d
1097
1098 CLEANFILES += cmd-_linux_mod-loader_i386_pc_linux.lst fs-_linux_mod-loader_i386_pc_linux.lst
1099 COMMANDFILES += cmd-_linux_mod-loader_i386_pc_linux.lst
1100 FSFILES += fs-_linux_mod-loader_i386_pc_linux.lst
1101
1102 cmd-_linux_mod-loader_i386_pc_linux.lst: loader/i386/pc/linux.c gencmdlist.sh
1103 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)
1104
1105 fs-_linux_mod-loader_i386_pc_linux.lst: loader/i386/pc/linux.c genfslist.sh
1106 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)
1107
1108
1109 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
1110 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
1111
1112 # For linux.mod.
1113 linux_mod_SOURCES = loader/i386/pc/linux_normal.c
1114 CLEANFILES += linux.mod mod-linux.o mod-linux.c pre-linux.o linux_mod-loader_i386_pc_linux_normal.o und-linux.lst
1115 ifneq ($(linux_mod_EXPORTS),no)
1116 CLEANFILES += def-linux.lst
1117 DEFSYMFILES += def-linux.lst
1118 endif
1119 MOSTLYCLEANFILES += linux_mod-loader_i386_pc_linux_normal.d
1120 UNDSYMFILES += und-linux.lst
1121
1122 linux.mod: pre-linux.o mod-linux.o
1123 -rm -f $@
1124 $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1125 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1126
1127 pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_pc_linux_normal.o
1128 -rm -f $@
1129 $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ linux_mod-loader_i386_pc_linux_normal.o
1130
1131 mod-linux.o: mod-linux.c
1132 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -c -o $@ $<
1133
1134 mod-linux.c: moddep.lst genmodsrc.sh
1135 sh $(srcdir)/genmodsrc.sh 'linux' $< > $@ || (rm -f $@; exit 1)
1136
1137 ifneq ($(linux_mod_EXPORTS),no)
1138 def-linux.lst: pre-linux.o
1139 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 linux/' > $@
1140 endif
1141
1142 und-linux.lst: pre-linux.o
1143 echo 'linux' > $@
1144 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1145
1146 linux_mod-loader_i386_pc_linux_normal.o: loader/i386/pc/linux_normal.c
1147 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -MD -c -o $@ $<
1148 -include linux_mod-loader_i386_pc_linux_normal.d
1149
1150 CLEANFILES += cmd-linux_mod-loader_i386_pc_linux_normal.lst fs-linux_mod-loader_i386_pc_linux_normal.lst
1151 COMMANDFILES += cmd-linux_mod-loader_i386_pc_linux_normal.lst
1152 FSFILES += fs-linux_mod-loader_i386_pc_linux_normal.lst
1153
1154 cmd-linux_mod-loader_i386_pc_linux_normal.lst: loader/i386/pc/linux_normal.c gencmdlist.sh
1155 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)
1156
1157 fs-linux_mod-loader_i386_pc_linux_normal.lst: loader/i386/pc/linux_normal.c genfslist.sh
1158 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)
1159
1160
1161 linux_mod_CFLAGS = $(COMMON_CFLAGS)
1162 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
1163
1164 # For normal.mod.
1165 normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
1166 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
1167 normal/completion.c normal/execute.c \
1168 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
1169 normal/menu_entry.c normal/misc.c grub_script.tab.c \
1170 normal/script.c normal/i386/setjmp.S
1171 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
1172 ifneq ($(normal_mod_EXPORTS),no)
1173 CLEANFILES += def-normal.lst
1174 DEFSYMFILES += def-normal.lst
1175 endif
1176 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
1177 UNDSYMFILES += und-normal.lst
1178
1179 normal.mod: pre-normal.o mod-normal.o
1180 -rm -f $@
1181 $(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1182 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1183
1184 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
1185 -rm -f $@
1186 $(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
1187
1188 mod-normal.o: mod-normal.c
1189 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
1190
1191 mod-normal.c: moddep.lst genmodsrc.sh
1192 sh $(srcdir)/genmodsrc.sh 'normal' $< > $@ || (rm -f $@; exit 1)
1193
1194 ifneq ($(normal_mod_EXPORTS),no)
1195 def-normal.lst: pre-normal.o
1196 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 normal/' > $@
1197 endif
1198
1199 und-normal.lst: pre-normal.o
1200 echo 'normal' > $@
1201 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1202
1203 normal_mod-normal_arg.o: normal/arg.c
1204 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1205 -include normal_mod-normal_arg.d
1206
1207 CLEANFILES += cmd-normal_mod-normal_arg.lst fs-normal_mod-normal_arg.lst
1208 COMMANDFILES += cmd-normal_mod-normal_arg.lst
1209 FSFILES += fs-normal_mod-normal_arg.lst
1210
1211 cmd-normal_mod-normal_arg.lst: normal/arg.c gencmdlist.sh
1212 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)
1213
1214 fs-normal_mod-normal_arg.lst: normal/arg.c genfslist.sh
1215 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)
1216
1217
1218 normal_mod-normal_cmdline.o: normal/cmdline.c
1219 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1220 -include normal_mod-normal_cmdline.d
1221
1222 CLEANFILES += cmd-normal_mod-normal_cmdline.lst fs-normal_mod-normal_cmdline.lst
1223 COMMANDFILES += cmd-normal_mod-normal_cmdline.lst
1224 FSFILES += fs-normal_mod-normal_cmdline.lst
1225
1226 cmd-normal_mod-normal_cmdline.lst: normal/cmdline.c gencmdlist.sh
1227 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)
1228
1229 fs-normal_mod-normal_cmdline.lst: normal/cmdline.c genfslist.sh
1230 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)
1231
1232
1233 normal_mod-normal_command.o: normal/command.c
1234 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1235 -include normal_mod-normal_command.d
1236
1237 CLEANFILES += cmd-normal_mod-normal_command.lst fs-normal_mod-normal_command.lst
1238 COMMANDFILES += cmd-normal_mod-normal_command.lst
1239 FSFILES += fs-normal_mod-normal_command.lst
1240
1241 cmd-normal_mod-normal_command.lst: normal/command.c gencmdlist.sh
1242 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)
1243
1244 fs-normal_mod-normal_command.lst: normal/command.c genfslist.sh
1245 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)
1246
1247
1248 normal_mod-normal_completion.o: normal/completion.c
1249 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1250 -include normal_mod-normal_completion.d
1251
1252 CLEANFILES += cmd-normal_mod-normal_completion.lst fs-normal_mod-normal_completion.lst
1253 COMMANDFILES += cmd-normal_mod-normal_completion.lst
1254 FSFILES += fs-normal_mod-normal_completion.lst
1255
1256 cmd-normal_mod-normal_completion.lst: normal/completion.c gencmdlist.sh
1257 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)
1258
1259 fs-normal_mod-normal_completion.lst: normal/completion.c genfslist.sh
1260 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)
1261
1262
1263 normal_mod-normal_execute.o: normal/execute.c
1264 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1265 -include normal_mod-normal_execute.d
1266
1267 CLEANFILES += cmd-normal_mod-normal_execute.lst fs-normal_mod-normal_execute.lst
1268 COMMANDFILES += cmd-normal_mod-normal_execute.lst
1269 FSFILES += fs-normal_mod-normal_execute.lst
1270
1271 cmd-normal_mod-normal_execute.lst: normal/execute.c gencmdlist.sh
1272 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)
1273
1274 fs-normal_mod-normal_execute.lst: normal/execute.c genfslist.sh
1275 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)
1276
1277
1278 normal_mod-normal_function.o: normal/function.c
1279 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1280 -include normal_mod-normal_function.d
1281
1282 CLEANFILES += cmd-normal_mod-normal_function.lst fs-normal_mod-normal_function.lst
1283 COMMANDFILES += cmd-normal_mod-normal_function.lst
1284 FSFILES += fs-normal_mod-normal_function.lst
1285
1286 cmd-normal_mod-normal_function.lst: normal/function.c gencmdlist.sh
1287 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)
1288
1289 fs-normal_mod-normal_function.lst: normal/function.c genfslist.sh
1290 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)
1291
1292
1293 normal_mod-normal_lexer.o: normal/lexer.c
1294 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1295 -include normal_mod-normal_lexer.d
1296
1297 CLEANFILES += cmd-normal_mod-normal_lexer.lst fs-normal_mod-normal_lexer.lst
1298 COMMANDFILES += cmd-normal_mod-normal_lexer.lst
1299 FSFILES += fs-normal_mod-normal_lexer.lst
1300
1301 cmd-normal_mod-normal_lexer.lst: normal/lexer.c gencmdlist.sh
1302 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)
1303
1304 fs-normal_mod-normal_lexer.lst: normal/lexer.c genfslist.sh
1305 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)
1306
1307
1308 normal_mod-normal_main.o: normal/main.c
1309 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1310 -include normal_mod-normal_main.d
1311
1312 CLEANFILES += cmd-normal_mod-normal_main.lst fs-normal_mod-normal_main.lst
1313 COMMANDFILES += cmd-normal_mod-normal_main.lst
1314 FSFILES += fs-normal_mod-normal_main.lst
1315
1316 cmd-normal_mod-normal_main.lst: normal/main.c gencmdlist.sh
1317 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)
1318
1319 fs-normal_mod-normal_main.lst: normal/main.c genfslist.sh
1320 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)
1321
1322
1323 normal_mod-normal_menu.o: normal/menu.c
1324 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1325 -include normal_mod-normal_menu.d
1326
1327 CLEANFILES += cmd-normal_mod-normal_menu.lst fs-normal_mod-normal_menu.lst
1328 COMMANDFILES += cmd-normal_mod-normal_menu.lst
1329 FSFILES += fs-normal_mod-normal_menu.lst
1330
1331 cmd-normal_mod-normal_menu.lst: normal/menu.c gencmdlist.sh
1332 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)
1333
1334 fs-normal_mod-normal_menu.lst: normal/menu.c genfslist.sh
1335 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)
1336
1337
1338 normal_mod-normal_menu_entry.o: normal/menu_entry.c
1339 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1340 -include normal_mod-normal_menu_entry.d
1341
1342 CLEANFILES += cmd-normal_mod-normal_menu_entry.lst fs-normal_mod-normal_menu_entry.lst
1343 COMMANDFILES += cmd-normal_mod-normal_menu_entry.lst
1344 FSFILES += fs-normal_mod-normal_menu_entry.lst
1345
1346 cmd-normal_mod-normal_menu_entry.lst: normal/menu_entry.c gencmdlist.sh
1347 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)
1348
1349 fs-normal_mod-normal_menu_entry.lst: normal/menu_entry.c genfslist.sh
1350 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)
1351
1352
1353 normal_mod-normal_misc.o: normal/misc.c
1354 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1355 -include normal_mod-normal_misc.d
1356
1357 CLEANFILES += cmd-normal_mod-normal_misc.lst fs-normal_mod-normal_misc.lst
1358 COMMANDFILES += cmd-normal_mod-normal_misc.lst
1359 FSFILES += fs-normal_mod-normal_misc.lst
1360
1361 cmd-normal_mod-normal_misc.lst: normal/misc.c gencmdlist.sh
1362 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)
1363
1364 fs-normal_mod-normal_misc.lst: normal/misc.c genfslist.sh
1365 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)
1366
1367
1368 normal_mod-grub_script_tab.o: grub_script.tab.c
1369 $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1370 -include normal_mod-grub_script_tab.d
1371
1372 CLEANFILES += cmd-normal_mod-grub_script_tab.lst fs-normal_mod-grub_script_tab.lst
1373 COMMANDFILES += cmd-normal_mod-grub_script_tab.lst
1374 FSFILES += fs-normal_mod-grub_script_tab.lst
1375
1376 cmd-normal_mod-grub_script_tab.lst: grub_script.tab.c gencmdlist.sh
1377 set -e; $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
1378
1379 fs-normal_mod-grub_script_tab.lst: grub_script.tab.c genfslist.sh
1380 set -e; $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
1381
1382
1383 normal_mod-normal_script.o: normal/script.c
1384 $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
1385 -include normal_mod-normal_script.d
1386
1387 CLEANFILES += cmd-normal_mod-normal_script.lst fs-normal_mod-normal_script.lst
1388 COMMANDFILES += cmd-normal_mod-normal_script.lst
1389 FSFILES += fs-normal_mod-normal_script.lst
1390
1391 cmd-normal_mod-normal_script.lst: normal/script.c gencmdlist.sh
1392 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)
1393
1394 fs-normal_mod-normal_script.lst: normal/script.c genfslist.sh
1395 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)
1396
1397
1398 normal_mod-normal_i386_setjmp.o: normal/i386/setjmp.S
1399 $(TARGET_CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(normal_mod_ASFLAGS) -MD -c -o $@ $<
1400 -include normal_mod-normal_i386_setjmp.d
1401
1402 CLEANFILES += cmd-normal_mod-normal_i386_setjmp.lst fs-normal_mod-normal_i386_setjmp.lst
1403 COMMANDFILES += cmd-normal_mod-normal_i386_setjmp.lst
1404 FSFILES += fs-normal_mod-normal_i386_setjmp.lst
1405
1406 cmd-normal_mod-normal_i386_setjmp.lst: normal/i386/setjmp.S gencmdlist.sh
1407 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)
1408
1409 fs-normal_mod-normal_i386_setjmp.lst: normal/i386/setjmp.S genfslist.sh
1410 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)
1411
1412
1413 normal_mod_CFLAGS = $(COMMON_CFLAGS)
1414 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
1415 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
1416
1417 # For reboot.mod.
1418 reboot_mod_SOURCES = commands/i386/pc/reboot.c
1419 CLEANFILES += reboot.mod mod-reboot.o mod-reboot.c pre-reboot.o reboot_mod-commands_i386_pc_reboot.o und-reboot.lst
1420 ifneq ($(reboot_mod_EXPORTS),no)
1421 CLEANFILES += def-reboot.lst
1422 DEFSYMFILES += def-reboot.lst
1423 endif
1424 MOSTLYCLEANFILES += reboot_mod-commands_i386_pc_reboot.d
1425 UNDSYMFILES += und-reboot.lst
1426
1427 reboot.mod: pre-reboot.o mod-reboot.o
1428 -rm -f $@
1429 $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1430 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1431
1432 pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_i386_pc_reboot.o
1433 -rm -f $@
1434 $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ reboot_mod-commands_i386_pc_reboot.o
1435
1436 mod-reboot.o: mod-reboot.c
1437 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -c -o $@ $<
1438
1439 mod-reboot.c: moddep.lst genmodsrc.sh
1440 sh $(srcdir)/genmodsrc.sh 'reboot' $< > $@ || (rm -f $@; exit 1)
1441
1442 ifneq ($(reboot_mod_EXPORTS),no)
1443 def-reboot.lst: pre-reboot.o
1444 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 reboot/' > $@
1445 endif
1446
1447 und-reboot.lst: pre-reboot.o
1448 echo 'reboot' > $@
1449 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1450
1451 reboot_mod-commands_i386_pc_reboot.o: commands/i386/pc/reboot.c
1452 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -MD -c -o $@ $<
1453 -include reboot_mod-commands_i386_pc_reboot.d
1454
1455 CLEANFILES += cmd-reboot_mod-commands_i386_pc_reboot.lst fs-reboot_mod-commands_i386_pc_reboot.lst
1456 COMMANDFILES += cmd-reboot_mod-commands_i386_pc_reboot.lst
1457 FSFILES += fs-reboot_mod-commands_i386_pc_reboot.lst
1458
1459 cmd-reboot_mod-commands_i386_pc_reboot.lst: commands/i386/pc/reboot.c gencmdlist.sh
1460 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)
1461
1462 fs-reboot_mod-commands_i386_pc_reboot.lst: commands/i386/pc/reboot.c genfslist.sh
1463 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)
1464
1465
1466 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
1467 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1468
1469 # For halt.mod.
1470 halt_mod_SOURCES = commands/i386/pc/halt.c
1471 CLEANFILES += halt.mod mod-halt.o mod-halt.c pre-halt.o halt_mod-commands_i386_pc_halt.o und-halt.lst
1472 ifneq ($(halt_mod_EXPORTS),no)
1473 CLEANFILES += def-halt.lst
1474 DEFSYMFILES += def-halt.lst
1475 endif
1476 MOSTLYCLEANFILES += halt_mod-commands_i386_pc_halt.d
1477 UNDSYMFILES += und-halt.lst
1478
1479 halt.mod: pre-halt.o mod-halt.o
1480 -rm -f $@
1481 $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1482 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1483
1484 pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_i386_pc_halt.o
1485 -rm -f $@
1486 $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ halt_mod-commands_i386_pc_halt.o
1487
1488 mod-halt.o: mod-halt.c
1489 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -c -o $@ $<
1490
1491 mod-halt.c: moddep.lst genmodsrc.sh
1492 sh $(srcdir)/genmodsrc.sh 'halt' $< > $@ || (rm -f $@; exit 1)
1493
1494 ifneq ($(halt_mod_EXPORTS),no)
1495 def-halt.lst: pre-halt.o
1496 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 halt/' > $@
1497 endif
1498
1499 und-halt.lst: pre-halt.o
1500 echo 'halt' > $@
1501 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1502
1503 halt_mod-commands_i386_pc_halt.o: commands/i386/pc/halt.c
1504 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -MD -c -o $@ $<
1505 -include halt_mod-commands_i386_pc_halt.d
1506
1507 CLEANFILES += cmd-halt_mod-commands_i386_pc_halt.lst fs-halt_mod-commands_i386_pc_halt.lst
1508 COMMANDFILES += cmd-halt_mod-commands_i386_pc_halt.lst
1509 FSFILES += fs-halt_mod-commands_i386_pc_halt.lst
1510
1511 cmd-halt_mod-commands_i386_pc_halt.lst: commands/i386/pc/halt.c gencmdlist.sh
1512 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)
1513
1514 fs-halt_mod-commands_i386_pc_halt.lst: commands/i386/pc/halt.c genfslist.sh
1515 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)
1516
1517
1518 halt_mod_CFLAGS = $(COMMON_CFLAGS)
1519 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
1520
1521 # For serial.mod.
1522 serial_mod_SOURCES = term/i386/pc/serial.c
1523 CLEANFILES += serial.mod mod-serial.o mod-serial.c pre-serial.o serial_mod-term_i386_pc_serial.o und-serial.lst
1524 ifneq ($(serial_mod_EXPORTS),no)
1525 CLEANFILES += def-serial.lst
1526 DEFSYMFILES += def-serial.lst
1527 endif
1528 MOSTLYCLEANFILES += serial_mod-term_i386_pc_serial.d
1529 UNDSYMFILES += und-serial.lst
1530
1531 serial.mod: pre-serial.o mod-serial.o
1532 -rm -f $@
1533 $(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1534 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1535
1536 pre-serial.o: $(serial_mod_DEPENDENCIES) serial_mod-term_i386_pc_serial.o
1537 -rm -f $@
1538 $(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ serial_mod-term_i386_pc_serial.o
1539
1540 mod-serial.o: mod-serial.c
1541 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
1542
1543 mod-serial.c: moddep.lst genmodsrc.sh
1544 sh $(srcdir)/genmodsrc.sh 'serial' $< > $@ || (rm -f $@; exit 1)
1545
1546 ifneq ($(serial_mod_EXPORTS),no)
1547 def-serial.lst: pre-serial.o
1548 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 serial/' > $@
1549 endif
1550
1551 und-serial.lst: pre-serial.o
1552 echo 'serial' > $@
1553 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1554
1555 serial_mod-term_i386_pc_serial.o: term/i386/pc/serial.c
1556 $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(serial_mod_CFLAGS) -MD -c -o $@ $<
1557 -include serial_mod-term_i386_pc_serial.d
1558
1559 CLEANFILES += cmd-serial_mod-term_i386_pc_serial.lst fs-serial_mod-term_i386_pc_serial.lst
1560 COMMANDFILES += cmd-serial_mod-term_i386_pc_serial.lst
1561 FSFILES += fs-serial_mod-term_i386_pc_serial.lst
1562
1563 cmd-serial_mod-term_i386_pc_serial.lst: term/i386/pc/serial.c gencmdlist.sh
1564 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)
1565
1566 fs-serial_mod-term_i386_pc_serial.lst: term/i386/pc/serial.c genfslist.sh
1567 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)
1568
1569
1570 serial_mod_CFLAGS = $(COMMON_CFLAGS)
1571 serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
1572
1573 # For _multiboot.mod.
1574 _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c \
1575 loader/i386/pc/multiboot2.c \
1576 loader/multiboot2.c \
1577 loader/multiboot_loader.c
1578 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
1579 ifneq ($(_multiboot_mod_EXPORTS),no)
1580 CLEANFILES += def-_multiboot.lst
1581 DEFSYMFILES += def-_multiboot.lst
1582 endif
1583 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
1584 UNDSYMFILES += und-_multiboot.lst
1585
1586 _multiboot.mod: pre-_multiboot.o mod-_multiboot.o
1587 -rm -f $@
1588 $(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1589 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1590
1591 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
1592 -rm -f $@
1593 $(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
1594
1595 mod-_multiboot.o: mod-_multiboot.c
1596 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
1597
1598 mod-_multiboot.c: moddep.lst genmodsrc.sh
1599 sh $(srcdir)/genmodsrc.sh '_multiboot' $< > $@ || (rm -f $@; exit 1)
1600
1601 ifneq ($(_multiboot_mod_EXPORTS),no)
1602 def-_multiboot.lst: pre-_multiboot.o
1603 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _multiboot/' > $@
1604 endif
1605
1606 und-_multiboot.lst: pre-_multiboot.o
1607 echo '_multiboot' > $@
1608 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1609
1610 _multiboot_mod-loader_i386_pc_multiboot.o: loader/i386/pc/multiboot.c
1611 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1612 -include _multiboot_mod-loader_i386_pc_multiboot.d
1613
1614 CLEANFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot.lst fs-_multiboot_mod-loader_i386_pc_multiboot.lst
1615 COMMANDFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot.lst
1616 FSFILES += fs-_multiboot_mod-loader_i386_pc_multiboot.lst
1617
1618 cmd-_multiboot_mod-loader_i386_pc_multiboot.lst: loader/i386/pc/multiboot.c gencmdlist.sh
1619 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)
1620
1621 fs-_multiboot_mod-loader_i386_pc_multiboot.lst: loader/i386/pc/multiboot.c genfslist.sh
1622 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)
1623
1624
1625 _multiboot_mod-loader_i386_pc_multiboot2.o: loader/i386/pc/multiboot2.c
1626 $(TARGET_CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1627 -include _multiboot_mod-loader_i386_pc_multiboot2.d
1628
1629 CLEANFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst fs-_multiboot_mod-loader_i386_pc_multiboot2.lst
1630 COMMANDFILES += cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst
1631 FSFILES += fs-_multiboot_mod-loader_i386_pc_multiboot2.lst
1632
1633 cmd-_multiboot_mod-loader_i386_pc_multiboot2.lst: loader/i386/pc/multiboot2.c gencmdlist.sh
1634 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)
1635
1636 fs-_multiboot_mod-loader_i386_pc_multiboot2.lst: loader/i386/pc/multiboot2.c genfslist.sh
1637 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)
1638
1639
1640 _multiboot_mod-loader_multiboot2.o: loader/multiboot2.c
1641 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1642 -include _multiboot_mod-loader_multiboot2.d
1643
1644 CLEANFILES += cmd-_multiboot_mod-loader_multiboot2.lst fs-_multiboot_mod-loader_multiboot2.lst
1645 COMMANDFILES += cmd-_multiboot_mod-loader_multiboot2.lst
1646 FSFILES += fs-_multiboot_mod-loader_multiboot2.lst
1647
1648 cmd-_multiboot_mod-loader_multiboot2.lst: loader/multiboot2.c gencmdlist.sh
1649 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)
1650
1651 fs-_multiboot_mod-loader_multiboot2.lst: loader/multiboot2.c genfslist.sh
1652 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)
1653
1654
1655 _multiboot_mod-loader_multiboot_loader.o: loader/multiboot_loader.c
1656 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_multiboot_mod_CFLAGS) -MD -c -o $@ $<
1657 -include _multiboot_mod-loader_multiboot_loader.d
1658
1659 CLEANFILES += cmd-_multiboot_mod-loader_multiboot_loader.lst fs-_multiboot_mod-loader_multiboot_loader.lst
1660 COMMANDFILES += cmd-_multiboot_mod-loader_multiboot_loader.lst
1661 FSFILES += fs-_multiboot_mod-loader_multiboot_loader.lst
1662
1663 cmd-_multiboot_mod-loader_multiboot_loader.lst: loader/multiboot_loader.c gencmdlist.sh
1664 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)
1665
1666 fs-_multiboot_mod-loader_multiboot_loader.lst: loader/multiboot_loader.c genfslist.sh
1667 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)
1668
1669
1670 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
1671 _multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1672
1673 # For multiboot.mod.
1674 multiboot_mod_SOURCES = loader/multiboot_loader_normal.c
1675 CLEANFILES += multiboot.mod mod-multiboot.o mod-multiboot.c pre-multiboot.o multiboot_mod-loader_multiboot_loader_normal.o und-multiboot.lst
1676 ifneq ($(multiboot_mod_EXPORTS),no)
1677 CLEANFILES += def-multiboot.lst
1678 DEFSYMFILES += def-multiboot.lst
1679 endif
1680 MOSTLYCLEANFILES += multiboot_mod-loader_multiboot_loader_normal.d
1681 UNDSYMFILES += und-multiboot.lst
1682
1683 multiboot.mod: pre-multiboot.o mod-multiboot.o
1684 -rm -f $@
1685 $(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1686 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1687
1688 pre-multiboot.o: $(multiboot_mod_DEPENDENCIES) multiboot_mod-loader_multiboot_loader_normal.o
1689 -rm -f $@
1690 $(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ multiboot_mod-loader_multiboot_loader_normal.o
1691
1692 mod-multiboot.o: mod-multiboot.c
1693 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -c -o $@ $<
1694
1695 mod-multiboot.c: moddep.lst genmodsrc.sh
1696 sh $(srcdir)/genmodsrc.sh 'multiboot' $< > $@ || (rm -f $@; exit 1)
1697
1698 ifneq ($(multiboot_mod_EXPORTS),no)
1699 def-multiboot.lst: pre-multiboot.o
1700 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 multiboot/' > $@
1701 endif
1702
1703 und-multiboot.lst: pre-multiboot.o
1704 echo 'multiboot' > $@
1705 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1706
1707 multiboot_mod-loader_multiboot_loader_normal.o: loader/multiboot_loader_normal.c
1708 $(TARGET_CC) -Iloader -I$(srcdir)/loader $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(multiboot_mod_CFLAGS) -MD -c -o $@ $<
1709 -include multiboot_mod-loader_multiboot_loader_normal.d
1710
1711 CLEANFILES += cmd-multiboot_mod-loader_multiboot_loader_normal.lst fs-multiboot_mod-loader_multiboot_loader_normal.lst
1712 COMMANDFILES += cmd-multiboot_mod-loader_multiboot_loader_normal.lst
1713 FSFILES += fs-multiboot_mod-loader_multiboot_loader_normal.lst
1714
1715 cmd-multiboot_mod-loader_multiboot_loader_normal.lst: loader/multiboot_loader_normal.c gencmdlist.sh
1716 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)
1717
1718 fs-multiboot_mod-loader_multiboot_loader_normal.lst: loader/multiboot_loader_normal.c genfslist.sh
1719 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)
1720
1721
1722 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
1723 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
1724
1725 # For vbe.mod.
1726 vbe_mod_SOURCES = video/i386/pc/vbe.c video/i386/pc/vbeblit.c \
1727 video/i386/pc/vbefill.c video/i386/pc/vbeutil.c
1728 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
1729 ifneq ($(vbe_mod_EXPORTS),no)
1730 CLEANFILES += def-vbe.lst
1731 DEFSYMFILES += def-vbe.lst
1732 endif
1733 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
1734 UNDSYMFILES += und-vbe.lst
1735
1736 vbe.mod: pre-vbe.o mod-vbe.o
1737 -rm -f $@
1738 $(TARGET_CC) $(vbe_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1739 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1740
1741 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
1742 -rm -f $@
1743 $(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
1744
1745 mod-vbe.o: mod-vbe.c
1746 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -c -o $@ $<
1747
1748 mod-vbe.c: moddep.lst genmodsrc.sh
1749 sh $(srcdir)/genmodsrc.sh 'vbe' $< > $@ || (rm -f $@; exit 1)
1750
1751 ifneq ($(vbe_mod_EXPORTS),no)
1752 def-vbe.lst: pre-vbe.o
1753 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbe/' > $@
1754 endif
1755
1756 und-vbe.lst: pre-vbe.o
1757 echo 'vbe' > $@
1758 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1759
1760 vbe_mod-video_i386_pc_vbe.o: video/i386/pc/vbe.c
1761 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1762 -include vbe_mod-video_i386_pc_vbe.d
1763
1764 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbe.lst fs-vbe_mod-video_i386_pc_vbe.lst
1765 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbe.lst
1766 FSFILES += fs-vbe_mod-video_i386_pc_vbe.lst
1767
1768 cmd-vbe_mod-video_i386_pc_vbe.lst: video/i386/pc/vbe.c gencmdlist.sh
1769 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)
1770
1771 fs-vbe_mod-video_i386_pc_vbe.lst: video/i386/pc/vbe.c genfslist.sh
1772 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)
1773
1774
1775 vbe_mod-video_i386_pc_vbeblit.o: video/i386/pc/vbeblit.c
1776 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1777 -include vbe_mod-video_i386_pc_vbeblit.d
1778
1779 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbeblit.lst fs-vbe_mod-video_i386_pc_vbeblit.lst
1780 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbeblit.lst
1781 FSFILES += fs-vbe_mod-video_i386_pc_vbeblit.lst
1782
1783 cmd-vbe_mod-video_i386_pc_vbeblit.lst: video/i386/pc/vbeblit.c gencmdlist.sh
1784 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)
1785
1786 fs-vbe_mod-video_i386_pc_vbeblit.lst: video/i386/pc/vbeblit.c genfslist.sh
1787 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)
1788
1789
1790 vbe_mod-video_i386_pc_vbefill.o: video/i386/pc/vbefill.c
1791 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1792 -include vbe_mod-video_i386_pc_vbefill.d
1793
1794 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbefill.lst fs-vbe_mod-video_i386_pc_vbefill.lst
1795 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbefill.lst
1796 FSFILES += fs-vbe_mod-video_i386_pc_vbefill.lst
1797
1798 cmd-vbe_mod-video_i386_pc_vbefill.lst: video/i386/pc/vbefill.c gencmdlist.sh
1799 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)
1800
1801 fs-vbe_mod-video_i386_pc_vbefill.lst: video/i386/pc/vbefill.c genfslist.sh
1802 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)
1803
1804
1805 vbe_mod-video_i386_pc_vbeutil.o: video/i386/pc/vbeutil.c
1806 $(TARGET_CC) -Ivideo/i386/pc -I$(srcdir)/video/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbe_mod_CFLAGS) -MD -c -o $@ $<
1807 -include vbe_mod-video_i386_pc_vbeutil.d
1808
1809 CLEANFILES += cmd-vbe_mod-video_i386_pc_vbeutil.lst fs-vbe_mod-video_i386_pc_vbeutil.lst
1810 COMMANDFILES += cmd-vbe_mod-video_i386_pc_vbeutil.lst
1811 FSFILES += fs-vbe_mod-video_i386_pc_vbeutil.lst
1812
1813 cmd-vbe_mod-video_i386_pc_vbeutil.lst: video/i386/pc/vbeutil.c gencmdlist.sh
1814 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)
1815
1816 fs-vbe_mod-video_i386_pc_vbeutil.lst: video/i386/pc/vbeutil.c genfslist.sh
1817 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)
1818
1819
1820 vbe_mod_CFLAGS = $(COMMON_CFLAGS)
1821 vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
1822
1823 # For vbeinfo.mod.
1824 vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
1825 CLEANFILES += vbeinfo.mod mod-vbeinfo.o mod-vbeinfo.c pre-vbeinfo.o vbeinfo_mod-commands_i386_pc_vbeinfo.o und-vbeinfo.lst
1826 ifneq ($(vbeinfo_mod_EXPORTS),no)
1827 CLEANFILES += def-vbeinfo.lst
1828 DEFSYMFILES += def-vbeinfo.lst
1829 endif
1830 MOSTLYCLEANFILES += vbeinfo_mod-commands_i386_pc_vbeinfo.d
1831 UNDSYMFILES += und-vbeinfo.lst
1832
1833 vbeinfo.mod: pre-vbeinfo.o mod-vbeinfo.o
1834 -rm -f $@
1835 $(TARGET_CC) $(vbeinfo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1836 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1837
1838 pre-vbeinfo.o: $(vbeinfo_mod_DEPENDENCIES) vbeinfo_mod-commands_i386_pc_vbeinfo.o
1839 -rm -f $@
1840 $(TARGET_CC) $(vbeinfo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vbeinfo_mod-commands_i386_pc_vbeinfo.o
1841
1842 mod-vbeinfo.o: mod-vbeinfo.c
1843 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -c -o $@ $<
1844
1845 mod-vbeinfo.c: moddep.lst genmodsrc.sh
1846 sh $(srcdir)/genmodsrc.sh 'vbeinfo' $< > $@ || (rm -f $@; exit 1)
1847
1848 ifneq ($(vbeinfo_mod_EXPORTS),no)
1849 def-vbeinfo.lst: pre-vbeinfo.o
1850 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbeinfo/' > $@
1851 endif
1852
1853 und-vbeinfo.lst: pre-vbeinfo.o
1854 echo 'vbeinfo' > $@
1855 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1856
1857 vbeinfo_mod-commands_i386_pc_vbeinfo.o: commands/i386/pc/vbeinfo.c
1858 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbeinfo_mod_CFLAGS) -MD -c -o $@ $<
1859 -include vbeinfo_mod-commands_i386_pc_vbeinfo.d
1860
1861 CLEANFILES += cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1862 COMMANDFILES += cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1863 FSFILES += fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst
1864
1865 cmd-vbeinfo_mod-commands_i386_pc_vbeinfo.lst: commands/i386/pc/vbeinfo.c gencmdlist.sh
1866 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)
1867
1868 fs-vbeinfo_mod-commands_i386_pc_vbeinfo.lst: commands/i386/pc/vbeinfo.c genfslist.sh
1869 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)
1870
1871
1872 vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
1873 vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
1874
1875 # For vbetest.mod.
1876 vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
1877 CLEANFILES += vbetest.mod mod-vbetest.o mod-vbetest.c pre-vbetest.o vbetest_mod-commands_i386_pc_vbetest.o und-vbetest.lst
1878 ifneq ($(vbetest_mod_EXPORTS),no)
1879 CLEANFILES += def-vbetest.lst
1880 DEFSYMFILES += def-vbetest.lst
1881 endif
1882 MOSTLYCLEANFILES += vbetest_mod-commands_i386_pc_vbetest.d
1883 UNDSYMFILES += und-vbetest.lst
1884
1885 vbetest.mod: pre-vbetest.o mod-vbetest.o
1886 -rm -f $@
1887 $(TARGET_CC) $(vbetest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1888 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1889
1890 pre-vbetest.o: $(vbetest_mod_DEPENDENCIES) vbetest_mod-commands_i386_pc_vbetest.o
1891 -rm -f $@
1892 $(TARGET_CC) $(vbetest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vbetest_mod-commands_i386_pc_vbetest.o
1893
1894 mod-vbetest.o: mod-vbetest.c
1895 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -c -o $@ $<
1896
1897 mod-vbetest.c: moddep.lst genmodsrc.sh
1898 sh $(srcdir)/genmodsrc.sh 'vbetest' $< > $@ || (rm -f $@; exit 1)
1899
1900 ifneq ($(vbetest_mod_EXPORTS),no)
1901 def-vbetest.lst: pre-vbetest.o
1902 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vbetest/' > $@
1903 endif
1904
1905 und-vbetest.lst: pre-vbetest.o
1906 echo 'vbetest' > $@
1907 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1908
1909 vbetest_mod-commands_i386_pc_vbetest.o: commands/i386/pc/vbetest.c
1910 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vbetest_mod_CFLAGS) -MD -c -o $@ $<
1911 -include vbetest_mod-commands_i386_pc_vbetest.d
1912
1913 CLEANFILES += cmd-vbetest_mod-commands_i386_pc_vbetest.lst fs-vbetest_mod-commands_i386_pc_vbetest.lst
1914 COMMANDFILES += cmd-vbetest_mod-commands_i386_pc_vbetest.lst
1915 FSFILES += fs-vbetest_mod-commands_i386_pc_vbetest.lst
1916
1917 cmd-vbetest_mod-commands_i386_pc_vbetest.lst: commands/i386/pc/vbetest.c gencmdlist.sh
1918 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)
1919
1920 fs-vbetest_mod-commands_i386_pc_vbetest.lst: commands/i386/pc/vbetest.c genfslist.sh
1921 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)
1922
1923
1924 vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
1925 vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
1926
1927 # For play.mod.
1928 play_mod_SOURCES = commands/i386/pc/play.c
1929 CLEANFILES += play.mod mod-play.o mod-play.c pre-play.o play_mod-commands_i386_pc_play.o und-play.lst
1930 ifneq ($(play_mod_EXPORTS),no)
1931 CLEANFILES += def-play.lst
1932 DEFSYMFILES += def-play.lst
1933 endif
1934 MOSTLYCLEANFILES += play_mod-commands_i386_pc_play.d
1935 UNDSYMFILES += und-play.lst
1936
1937 play.mod: pre-play.o mod-play.o
1938 -rm -f $@
1939 $(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1940 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1941
1942 pre-play.o: $(play_mod_DEPENDENCIES) play_mod-commands_i386_pc_play.o
1943 -rm -f $@
1944 $(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ play_mod-commands_i386_pc_play.o
1945
1946 mod-play.o: mod-play.c
1947 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -c -o $@ $<
1948
1949 mod-play.c: moddep.lst genmodsrc.sh
1950 sh $(srcdir)/genmodsrc.sh 'play' $< > $@ || (rm -f $@; exit 1)
1951
1952 ifneq ($(play_mod_EXPORTS),no)
1953 def-play.lst: pre-play.o
1954 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 play/' > $@
1955 endif
1956
1957 und-play.lst: pre-play.o
1958 echo 'play' > $@
1959 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1960
1961 play_mod-commands_i386_pc_play.o: commands/i386/pc/play.c
1962 $(TARGET_CC) -Icommands/i386/pc -I$(srcdir)/commands/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(play_mod_CFLAGS) -MD -c -o $@ $<
1963 -include play_mod-commands_i386_pc_play.d
1964
1965 CLEANFILES += cmd-play_mod-commands_i386_pc_play.lst fs-play_mod-commands_i386_pc_play.lst
1966 COMMANDFILES += cmd-play_mod-commands_i386_pc_play.lst
1967 FSFILES += fs-play_mod-commands_i386_pc_play.lst
1968
1969 cmd-play_mod-commands_i386_pc_play.lst: commands/i386/pc/play.c gencmdlist.sh
1970 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)
1971
1972 fs-play_mod-commands_i386_pc_play.lst: commands/i386/pc/play.c genfslist.sh
1973 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)
1974
1975
1976 play_mod_CFLAGS = $(COMMON_CFLAGS)
1977 play_mod_LDFLAGS = $(COMMON_LDFLAGS)
1978
1979 # For video.mod.
1980 video_mod_SOURCES = video/video.c
1981 CLEANFILES += video.mod mod-video.o mod-video.c pre-video.o video_mod-video_video.o und-video.lst
1982 ifneq ($(video_mod_EXPORTS),no)
1983 CLEANFILES += def-video.lst
1984 DEFSYMFILES += def-video.lst
1985 endif
1986 MOSTLYCLEANFILES += video_mod-video_video.d
1987 UNDSYMFILES += und-video.lst
1988
1989 video.mod: pre-video.o mod-video.o
1990 -rm -f $@
1991 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
1992 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
1993
1994 pre-video.o: $(video_mod_DEPENDENCIES) video_mod-video_video.o
1995 -rm -f $@
1996 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ video_mod-video_video.o
1997
1998 mod-video.o: mod-video.c
1999 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -c -o $@ $<
2000
2001 mod-video.c: moddep.lst genmodsrc.sh
2002 sh $(srcdir)/genmodsrc.sh 'video' $< > $@ || (rm -f $@; exit 1)
2003
2004 ifneq ($(video_mod_EXPORTS),no)
2005 def-video.lst: pre-video.o
2006 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 video/' > $@
2007 endif
2008
2009 und-video.lst: pre-video.o
2010 echo 'video' > $@
2011 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2012
2013 video_mod-video_video.o: video/video.c
2014 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -MD -c -o $@ $<
2015 -include video_mod-video_video.d
2016
2017 CLEANFILES += cmd-video_mod-video_video.lst fs-video_mod-video_video.lst
2018 COMMANDFILES += cmd-video_mod-video_video.lst
2019 FSFILES += fs-video_mod-video_video.lst
2020
2021 cmd-video_mod-video_video.lst: video/video.c gencmdlist.sh
2022 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)
2023
2024 fs-video_mod-video_video.lst: video/video.c genfslist.sh
2025 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)
2026
2027
2028 video_mod_CFLAGS = $(COMMON_CFLAGS)
2029 video_mod_LDFLAGS = $(COMMON_LDFLAGS)
2030
2031 # For gfxterm.mod.
2032 gfxterm_mod_SOURCES = term/gfxterm.c
2033 CLEANFILES += gfxterm.mod mod-gfxterm.o mod-gfxterm.c pre-gfxterm.o gfxterm_mod-term_gfxterm.o und-gfxterm.lst
2034 ifneq ($(gfxterm_mod_EXPORTS),no)
2035 CLEANFILES += def-gfxterm.lst
2036 DEFSYMFILES += def-gfxterm.lst
2037 endif
2038 MOSTLYCLEANFILES += gfxterm_mod-term_gfxterm.d
2039 UNDSYMFILES += und-gfxterm.lst
2040
2041 gfxterm.mod: pre-gfxterm.o mod-gfxterm.o
2042 -rm -f $@
2043 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2044 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2045
2046 pre-gfxterm.o: $(gfxterm_mod_DEPENDENCIES) gfxterm_mod-term_gfxterm.o
2047 -rm -f $@
2048 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ gfxterm_mod-term_gfxterm.o
2049
2050 mod-gfxterm.o: mod-gfxterm.c
2051 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -c -o $@ $<
2052
2053 mod-gfxterm.c: moddep.lst genmodsrc.sh
2054 sh $(srcdir)/genmodsrc.sh 'gfxterm' $< > $@ || (rm -f $@; exit 1)
2055
2056 ifneq ($(gfxterm_mod_EXPORTS),no)
2057 def-gfxterm.lst: pre-gfxterm.o
2058 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 gfxterm/' > $@
2059 endif
2060
2061 und-gfxterm.lst: pre-gfxterm.o
2062 echo 'gfxterm' > $@
2063 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2064
2065 gfxterm_mod-term_gfxterm.o: term/gfxterm.c
2066 $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -MD -c -o $@ $<
2067 -include gfxterm_mod-term_gfxterm.d
2068
2069 CLEANFILES += cmd-gfxterm_mod-term_gfxterm.lst fs-gfxterm_mod-term_gfxterm.lst
2070 COMMANDFILES += cmd-gfxterm_mod-term_gfxterm.lst
2071 FSFILES += fs-gfxterm_mod-term_gfxterm.lst
2072
2073 cmd-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c gencmdlist.sh
2074 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)
2075
2076 fs-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c genfslist.sh
2077 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)
2078
2079
2080 gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
2081 gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
2082
2083 # For videotest.mod.
2084 videotest_mod_SOURCES = commands/videotest.c
2085 CLEANFILES += videotest.mod mod-videotest.o mod-videotest.c pre-videotest.o videotest_mod-commands_videotest.o und-videotest.lst
2086 ifneq ($(videotest_mod_EXPORTS),no)
2087 CLEANFILES += def-videotest.lst
2088 DEFSYMFILES += def-videotest.lst
2089 endif
2090 MOSTLYCLEANFILES += videotest_mod-commands_videotest.d
2091 UNDSYMFILES += und-videotest.lst
2092
2093 videotest.mod: pre-videotest.o mod-videotest.o
2094 -rm -f $@
2095 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2096 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2097
2098 pre-videotest.o: $(videotest_mod_DEPENDENCIES) videotest_mod-commands_videotest.o
2099 -rm -f $@
2100 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ videotest_mod-commands_videotest.o
2101
2102 mod-videotest.o: mod-videotest.c
2103 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -c -o $@ $<
2104
2105 mod-videotest.c: moddep.lst genmodsrc.sh
2106 sh $(srcdir)/genmodsrc.sh 'videotest' $< > $@ || (rm -f $@; exit 1)
2107
2108 ifneq ($(videotest_mod_EXPORTS),no)
2109 def-videotest.lst: pre-videotest.o
2110 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 videotest/' > $@
2111 endif
2112
2113 und-videotest.lst: pre-videotest.o
2114 echo 'videotest' > $@
2115 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2116
2117 videotest_mod-commands_videotest.o: commands/videotest.c
2118 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -MD -c -o $@ $<
2119 -include videotest_mod-commands_videotest.d
2120
2121 CLEANFILES += cmd-videotest_mod-commands_videotest.lst fs-videotest_mod-commands_videotest.lst
2122 COMMANDFILES += cmd-videotest_mod-commands_videotest.lst
2123 FSFILES += fs-videotest_mod-commands_videotest.lst
2124
2125 cmd-videotest_mod-commands_videotest.lst: commands/videotest.c gencmdlist.sh
2126 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)
2127
2128 fs-videotest_mod-commands_videotest.lst: commands/videotest.c genfslist.sh
2129 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)
2130
2131
2132 videotest_mod_CFLAGS = $(COMMON_CFLAGS)
2133 videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
2134
2135 # For bitmap.mod
2136 bitmap_mod_SOURCES = video/bitmap.c
2137 CLEANFILES += bitmap.mod mod-bitmap.o mod-bitmap.c pre-bitmap.o bitmap_mod-video_bitmap.o und-bitmap.lst
2138 ifneq ($(bitmap_mod_EXPORTS),no)
2139 CLEANFILES += def-bitmap.lst
2140 DEFSYMFILES += def-bitmap.lst
2141 endif
2142 MOSTLYCLEANFILES += bitmap_mod-video_bitmap.d
2143 UNDSYMFILES += und-bitmap.lst
2144
2145 bitmap.mod: pre-bitmap.o mod-bitmap.o
2146 -rm -f $@
2147 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2148 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2149
2150 pre-bitmap.o: $(bitmap_mod_DEPENDENCIES) bitmap_mod-video_bitmap.o
2151 -rm -f $@
2152 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ bitmap_mod-video_bitmap.o
2153
2154 mod-bitmap.o: mod-bitmap.c
2155 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -c -o $@ $<
2156
2157 mod-bitmap.c: moddep.lst genmodsrc.sh
2158 sh $(srcdir)/genmodsrc.sh 'bitmap' $< > $@ || (rm -f $@; exit 1)
2159
2160 ifneq ($(bitmap_mod_EXPORTS),no)
2161 def-bitmap.lst: pre-bitmap.o
2162 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 bitmap/' > $@
2163 endif
2164
2165 und-bitmap.lst: pre-bitmap.o
2166 echo 'bitmap' > $@
2167 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2168
2169 bitmap_mod-video_bitmap.o: video/bitmap.c
2170 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -MD -c -o $@ $<
2171 -include bitmap_mod-video_bitmap.d
2172
2173 CLEANFILES += cmd-bitmap_mod-video_bitmap.lst fs-bitmap_mod-video_bitmap.lst
2174 COMMANDFILES += cmd-bitmap_mod-video_bitmap.lst
2175 FSFILES += fs-bitmap_mod-video_bitmap.lst
2176
2177 cmd-bitmap_mod-video_bitmap.lst: video/bitmap.c gencmdlist.sh
2178 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)
2179
2180 fs-bitmap_mod-video_bitmap.lst: video/bitmap.c genfslist.sh
2181 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)
2182
2183
2184 bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
2185 bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
2186
2187 # For tga.mod
2188 tga_mod_SOURCES = video/readers/tga.c
2189 CLEANFILES += tga.mod mod-tga.o mod-tga.c pre-tga.o tga_mod-video_readers_tga.o und-tga.lst
2190 ifneq ($(tga_mod_EXPORTS),no)
2191 CLEANFILES += def-tga.lst
2192 DEFSYMFILES += def-tga.lst
2193 endif
2194 MOSTLYCLEANFILES += tga_mod-video_readers_tga.d
2195 UNDSYMFILES += und-tga.lst
2196
2197 tga.mod: pre-tga.o mod-tga.o
2198 -rm -f $@
2199 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2200 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2201
2202 pre-tga.o: $(tga_mod_DEPENDENCIES) tga_mod-video_readers_tga.o
2203 -rm -f $@
2204 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ tga_mod-video_readers_tga.o
2205
2206 mod-tga.o: mod-tga.c
2207 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -c -o $@ $<
2208
2209 mod-tga.c: moddep.lst genmodsrc.sh
2210 sh $(srcdir)/genmodsrc.sh 'tga' $< > $@ || (rm -f $@; exit 1)
2211
2212 ifneq ($(tga_mod_EXPORTS),no)
2213 def-tga.lst: pre-tga.o
2214 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 tga/' > $@
2215 endif
2216
2217 und-tga.lst: pre-tga.o
2218 echo 'tga' > $@
2219 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2220
2221 tga_mod-video_readers_tga.o: video/readers/tga.c
2222 $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -MD -c -o $@ $<
2223 -include tga_mod-video_readers_tga.d
2224
2225 CLEANFILES += cmd-tga_mod-video_readers_tga.lst fs-tga_mod-video_readers_tga.lst
2226 COMMANDFILES += cmd-tga_mod-video_readers_tga.lst
2227 FSFILES += fs-tga_mod-video_readers_tga.lst
2228
2229 cmd-tga_mod-video_readers_tga.lst: video/readers/tga.c gencmdlist.sh
2230 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)
2231
2232 fs-tga_mod-video_readers_tga.lst: video/readers/tga.c genfslist.sh
2233 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)
2234
2235
2236 tga_mod_CFLAGS = $(COMMON_CFLAGS)
2237 tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
2238
2239 # For cpuid.mod.
2240 cpuid_mod_SOURCES = commands/i386/cpuid.c
2241 CLEANFILES += cpuid.mod mod-cpuid.o mod-cpuid.c pre-cpuid.o cpuid_mod-commands_i386_cpuid.o und-cpuid.lst
2242 ifneq ($(cpuid_mod_EXPORTS),no)
2243 CLEANFILES += def-cpuid.lst
2244 DEFSYMFILES += def-cpuid.lst
2245 endif
2246 MOSTLYCLEANFILES += cpuid_mod-commands_i386_cpuid.d
2247 UNDSYMFILES += und-cpuid.lst
2248
2249 cpuid.mod: pre-cpuid.o mod-cpuid.o
2250 -rm -f $@
2251 $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2252 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2253
2254 pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
2255 -rm -f $@
2256 $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ cpuid_mod-commands_i386_cpuid.o
2257
2258 mod-cpuid.o: mod-cpuid.c
2259 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -c -o $@ $<
2260
2261 mod-cpuid.c: moddep.lst genmodsrc.sh
2262 sh $(srcdir)/genmodsrc.sh 'cpuid' $< > $@ || (rm -f $@; exit 1)
2263
2264 ifneq ($(cpuid_mod_EXPORTS),no)
2265 def-cpuid.lst: pre-cpuid.o
2266 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cpuid/' > $@
2267 endif
2268
2269 und-cpuid.lst: pre-cpuid.o
2270 echo 'cpuid' > $@
2271 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2272
2273 cpuid_mod-commands_i386_cpuid.o: commands/i386/cpuid.c
2274 $(TARGET_CC) -Icommands/i386 -I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -MD -c -o $@ $<
2275 -include cpuid_mod-commands_i386_cpuid.d
2276
2277 CLEANFILES += cmd-cpuid_mod-commands_i386_cpuid.lst fs-cpuid_mod-commands_i386_cpuid.lst
2278 COMMANDFILES += cmd-cpuid_mod-commands_i386_cpuid.lst
2279 FSFILES += fs-cpuid_mod-commands_i386_cpuid.lst
2280
2281 cmd-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c gencmdlist.sh
2282 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)
2283
2284 fs-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c genfslist.sh
2285 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)
2286
2287
2288 cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
2289 cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
2290
2291 # For ata.mod.
2292 ata_mod_SOURCES = disk/ata.c
2293 CLEANFILES += ata.mod mod-ata.o mod-ata.c pre-ata.o ata_mod-disk_ata.o und-ata.lst
2294 ifneq ($(ata_mod_EXPORTS),no)
2295 CLEANFILES += def-ata.lst
2296 DEFSYMFILES += def-ata.lst
2297 endif
2298 MOSTLYCLEANFILES += ata_mod-disk_ata.d
2299 UNDSYMFILES += und-ata.lst
2300
2301 ata.mod: pre-ata.o mod-ata.o
2302 -rm -f $@
2303 $(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2304 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2305
2306 pre-ata.o: $(ata_mod_DEPENDENCIES) ata_mod-disk_ata.o
2307 -rm -f $@
2308 $(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ata_mod-disk_ata.o
2309
2310 mod-ata.o: mod-ata.c
2311 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -c -o $@ $<
2312
2313 mod-ata.c: moddep.lst genmodsrc.sh
2314 sh $(srcdir)/genmodsrc.sh 'ata' $< > $@ || (rm -f $@; exit 1)
2315
2316 ifneq ($(ata_mod_EXPORTS),no)
2317 def-ata.lst: pre-ata.o
2318 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ata/' > $@
2319 endif
2320
2321 und-ata.lst: pre-ata.o
2322 echo 'ata' > $@
2323 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2324
2325 ata_mod-disk_ata.o: disk/ata.c
2326 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ata_mod_CFLAGS) -MD -c -o $@ $<
2327 -include ata_mod-disk_ata.d
2328
2329 CLEANFILES += cmd-ata_mod-disk_ata.lst fs-ata_mod-disk_ata.lst
2330 COMMANDFILES += cmd-ata_mod-disk_ata.lst
2331 FSFILES += fs-ata_mod-disk_ata.lst
2332
2333 cmd-ata_mod-disk_ata.lst: disk/ata.c gencmdlist.sh
2334 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)
2335
2336 fs-ata_mod-disk_ata.lst: disk/ata.c genfslist.sh
2337 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)
2338
2339
2340 ata_mod_CFLAGS = $(COMMON_CFLAGS)
2341 ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
2342
2343 # For vga.mod.
2344 vga_mod_SOURCES = term/i386/pc/vga.c
2345 CLEANFILES += vga.mod mod-vga.o mod-vga.c pre-vga.o vga_mod-term_i386_pc_vga.o und-vga.lst
2346 ifneq ($(vga_mod_EXPORTS),no)
2347 CLEANFILES += def-vga.lst
2348 DEFSYMFILES += def-vga.lst
2349 endif
2350 MOSTLYCLEANFILES += vga_mod-term_i386_pc_vga.d
2351 UNDSYMFILES += und-vga.lst
2352
2353 vga.mod: pre-vga.o mod-vga.o
2354 -rm -f $@
2355 $(TARGET_CC) $(vga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
2356 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
2357
2358 pre-vga.o: $(vga_mod_DEPENDENCIES) vga_mod-term_i386_pc_vga.o
2359 -rm -f $@
2360 $(TARGET_CC) $(vga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ vga_mod-term_i386_pc_vga.o
2361
2362 mod-vga.o: mod-vga.c
2363 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $<
2364
2365 mod-vga.c: moddep.lst genmodsrc.sh
2366 sh $(srcdir)/genmodsrc.sh 'vga' $< > $@ || (rm -f $@; exit 1)
2367
2368 ifneq ($(vga_mod_EXPORTS),no)
2369 def-vga.lst: pre-vga.o
2370 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vga/' > $@
2371 endif
2372
2373 und-vga.lst: pre-vga.o
2374 echo 'vga' > $@
2375 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2376
2377 vga_mod-term_i386_pc_vga.o: term/i386/pc/vga.c
2378 $(TARGET_CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(vga_mod_CFLAGS) -MD -c -o $@ $<
2379 -include vga_mod-term_i386_pc_vga.d
2380
2381 CLEANFILES += cmd-vga_mod-term_i386_pc_vga.lst fs-vga_mod-term_i386_pc_vga.lst
2382 COMMANDFILES += cmd-vga_mod-term_i386_pc_vga.lst
2383 FSFILES += fs-vga_mod-term_i386_pc_vga.lst
2384
2385 cmd-vga_mod-term_i386_pc_vga.lst: term/i386/pc/vga.c gencmdlist.sh
2386 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)
2387
2388 fs-vga_mod-term_i386_pc_vga.lst: term/i386/pc/vga.c genfslist.sh
2389 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)
2390
2391
2392 vga_mod_CFLAGS = $(COMMON_CFLAGS)
2393 vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
2394
2395 include $(srcdir)/conf/common.mk