]> git.proxmox.com Git - grub2.git/blame - conf/common.mk
2009-02-08 Robert Millan <rmh@aybabtu.com>
[grub2.git] / conf / common.mk
CommitLineData
233b1628 1# -*- makefile -*-
cfd0b4e6 2# Generated by genmk.rb, please don't edit!
233b1628 3
42ce5170 4# For grub-mkelfimage.
5bin_UTILITIES += grub-mkelfimage
6grub_mkelfimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
7 util/resolve.c
8CLEANFILES += grub-mkelfimage$(EXEEXT) grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o
9MOSTLYCLEANFILES += grub_mkelfimage-util_elf_grub_mkimage.d grub_mkelfimage-util_misc.d grub_mkelfimage-util_resolve.d
10
11grub-mkelfimage: $(grub_mkelfimage_DEPENDENCIES) grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o
12 $(CC) -o $@ grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o $(LDFLAGS) $(grub_mkelfimage_LDFLAGS)
13
14grub_mkelfimage-util_elf_grub_mkimage.o: util/elf/grub-mkimage.c $(util/elf/grub-mkimage.c_DEPENDENCIES)
15 $(CC) -Iutil/elf -I$(srcdir)/util/elf $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
16-include grub_mkelfimage-util_elf_grub_mkimage.d
17
18grub_mkelfimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
19 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
20-include grub_mkelfimage-util_misc.d
21
22grub_mkelfimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
23 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
24-include grub_mkelfimage-util_resolve.d
25
26util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
27
ccaa8a5f 28# For grub-probe.
29sbin_UTILITIES += grub-probe
30util/grub-probe.c_DEPENDENCIES = grub_probe_init.h
31grub_probe_SOURCES = util/grub-probe.c \
ddbf5556 32 util/hostdisk.c util/misc.c util/getroot.c \
ccaa8a5f 33 kern/device.c kern/disk.c kern/err.c kern/misc.c \
34 kern/parser.c kern/partition.c kern/file.c \
35 \
36 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
0d16e571 37 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
ccaa8a5f 38 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
f821ce59 39 fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \
ccaa8a5f 40 \
41 partmap/pc.c partmap/apple.c partmap/gpt.c \
42 kern/fs.c kern/env.c fs/fshelp.c \
0bb5115e 43 disk/raid.c disk/mdraid_linux.c disk/lvm.c grub_probe_init.c
f821ce59 44CLEANFILES += grub-probe$(EXEEXT) grub_probe-util_grub_probe.o grub_probe-util_hostdisk.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-kern_parser.o grub_probe-kern_partition.o grub_probe-kern_file.o grub_probe-fs_affs.o grub_probe-fs_cpio.o grub_probe-fs_ext2.o grub_probe-fs_fat.o grub_probe-fs_hfs.o grub_probe-fs_hfsplus.o grub_probe-fs_iso9660.o grub_probe-fs_udf.o grub_probe-fs_jfs.o grub_probe-fs_minix.o grub_probe-fs_ntfs.o grub_probe-fs_ntfscomp.o grub_probe-fs_reiserfs.o grub_probe-fs_sfs.o grub_probe-fs_ufs.o grub_probe-fs_xfs.o grub_probe-fs_afs.o grub_probe-fs_tar.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-disk_raid.o grub_probe-disk_mdraid_linux.o grub_probe-disk_lvm.o grub_probe-grub_probe_init.o
45MOSTLYCLEANFILES += grub_probe-util_grub_probe.d grub_probe-util_hostdisk.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-kern_parser.d grub_probe-kern_partition.d grub_probe-kern_file.d grub_probe-fs_affs.d grub_probe-fs_cpio.d grub_probe-fs_ext2.d grub_probe-fs_fat.d grub_probe-fs_hfs.d grub_probe-fs_hfsplus.d grub_probe-fs_iso9660.d grub_probe-fs_udf.d grub_probe-fs_jfs.d grub_probe-fs_minix.d grub_probe-fs_ntfs.d grub_probe-fs_ntfscomp.d grub_probe-fs_reiserfs.d grub_probe-fs_sfs.d grub_probe-fs_ufs.d grub_probe-fs_xfs.d grub_probe-fs_afs.d grub_probe-fs_tar.d grub_probe-partmap_pc.d grub_probe-partmap_apple.d grub_probe-partmap_gpt.d grub_probe-kern_fs.d grub_probe-kern_env.d grub_probe-fs_fshelp.d grub_probe-disk_raid.d grub_probe-disk_mdraid_linux.d grub_probe-disk_lvm.d grub_probe-grub_probe_init.d
ccaa8a5f 46
f821ce59 47grub-probe: $(grub_probe_DEPENDENCIES) grub_probe-util_grub_probe.o grub_probe-util_hostdisk.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-kern_parser.o grub_probe-kern_partition.o grub_probe-kern_file.o grub_probe-fs_affs.o grub_probe-fs_cpio.o grub_probe-fs_ext2.o grub_probe-fs_fat.o grub_probe-fs_hfs.o grub_probe-fs_hfsplus.o grub_probe-fs_iso9660.o grub_probe-fs_udf.o grub_probe-fs_jfs.o grub_probe-fs_minix.o grub_probe-fs_ntfs.o grub_probe-fs_ntfscomp.o grub_probe-fs_reiserfs.o grub_probe-fs_sfs.o grub_probe-fs_ufs.o grub_probe-fs_xfs.o grub_probe-fs_afs.o grub_probe-fs_tar.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-disk_raid.o grub_probe-disk_mdraid_linux.o grub_probe-disk_lvm.o grub_probe-grub_probe_init.o
48 $(CC) -o $@ grub_probe-util_grub_probe.o grub_probe-util_hostdisk.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-kern_parser.o grub_probe-kern_partition.o grub_probe-kern_file.o grub_probe-fs_affs.o grub_probe-fs_cpio.o grub_probe-fs_ext2.o grub_probe-fs_fat.o grub_probe-fs_hfs.o grub_probe-fs_hfsplus.o grub_probe-fs_iso9660.o grub_probe-fs_udf.o grub_probe-fs_jfs.o grub_probe-fs_minix.o grub_probe-fs_ntfs.o grub_probe-fs_ntfscomp.o grub_probe-fs_reiserfs.o grub_probe-fs_sfs.o grub_probe-fs_ufs.o grub_probe-fs_xfs.o grub_probe-fs_afs.o grub_probe-fs_tar.o grub_probe-partmap_pc.o grub_probe-partmap_apple.o grub_probe-partmap_gpt.o grub_probe-kern_fs.o grub_probe-kern_env.o grub_probe-fs_fshelp.o grub_probe-disk_raid.o grub_probe-disk_mdraid_linux.o grub_probe-disk_lvm.o grub_probe-grub_probe_init.o $(LDFLAGS) $(grub_probe_LDFLAGS)
ccaa8a5f 49
50grub_probe-util_grub_probe.o: util/grub-probe.c $(util/grub-probe.c_DEPENDENCIES)
51 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
52-include grub_probe-util_grub_probe.d
53
ddbf5556 54grub_probe-util_hostdisk.o: util/hostdisk.c $(util/hostdisk.c_DEPENDENCIES)
ccaa8a5f 55 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
ddbf5556 56-include grub_probe-util_hostdisk.d
ccaa8a5f 57
58grub_probe-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
59 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
60-include grub_probe-util_misc.d
61
62grub_probe-util_getroot.o: util/getroot.c $(util/getroot.c_DEPENDENCIES)
63 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
64-include grub_probe-util_getroot.d
65
66grub_probe-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
67 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
68-include grub_probe-kern_device.d
69
70grub_probe-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
71 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
72-include grub_probe-kern_disk.d
73
74grub_probe-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
75 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
76-include grub_probe-kern_err.d
77
78grub_probe-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
79 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
80-include grub_probe-kern_misc.d
81
82grub_probe-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
83 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
84-include grub_probe-kern_parser.d
85
86grub_probe-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
87 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
88-include grub_probe-kern_partition.d
89
90grub_probe-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
91 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
92-include grub_probe-kern_file.d
93
94grub_probe-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
95 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
96-include grub_probe-fs_affs.d
97
98grub_probe-fs_cpio.o: fs/cpio.c $(fs/cpio.c_DEPENDENCIES)
99 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
100-include grub_probe-fs_cpio.d
101
102grub_probe-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
103 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
104-include grub_probe-fs_ext2.d
105
106grub_probe-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
107 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
108-include grub_probe-fs_fat.d
109
110grub_probe-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
111 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
112-include grub_probe-fs_hfs.d
113
114grub_probe-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
115 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
116-include grub_probe-fs_hfsplus.d
117
118grub_probe-fs_iso9660.o: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES)
119 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
120-include grub_probe-fs_iso9660.d
121
0d16e571 122grub_probe-fs_udf.o: fs/udf.c $(fs/udf.c_DEPENDENCIES)
123 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
124-include grub_probe-fs_udf.d
125
ccaa8a5f 126grub_probe-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
127 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
128-include grub_probe-fs_jfs.d
129
130grub_probe-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
131 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
132-include grub_probe-fs_minix.d
133
134grub_probe-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
135 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
136-include grub_probe-fs_ntfs.d
137
138grub_probe-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
139 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
140-include grub_probe-fs_ntfscomp.d
141
142grub_probe-fs_reiserfs.o: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES)
143 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
144-include grub_probe-fs_reiserfs.d
145
146grub_probe-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
147 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
148-include grub_probe-fs_sfs.d
149
150grub_probe-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
151 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
152-include grub_probe-fs_ufs.d
153
154grub_probe-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
155 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
156-include grub_probe-fs_xfs.d
157
86cb4f54 158grub_probe-fs_afs.o: fs/afs.c $(fs/afs.c_DEPENDENCIES)
159 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
160-include grub_probe-fs_afs.d
161
f821ce59 162grub_probe-fs_tar.o: fs/tar.c $(fs/tar.c_DEPENDENCIES)
163 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
164-include grub_probe-fs_tar.d
165
ccaa8a5f 166grub_probe-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
167 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
168-include grub_probe-partmap_pc.d
169
170grub_probe-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
171 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
172-include grub_probe-partmap_apple.d
173
174grub_probe-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
175 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
176-include grub_probe-partmap_gpt.d
177
178grub_probe-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
179 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
180-include grub_probe-kern_fs.d
181
182grub_probe-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
183 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
184-include grub_probe-kern_env.d
185
186grub_probe-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
187 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
188-include grub_probe-fs_fshelp.d
189
ccaa8a5f 190grub_probe-disk_raid.o: disk/raid.c $(disk/raid.c_DEPENDENCIES)
191 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
192-include grub_probe-disk_raid.d
193
5ed20adc 194grub_probe-disk_mdraid_linux.o: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES)
195 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
196-include grub_probe-disk_mdraid_linux.d
197
0bb5115e 198grub_probe-disk_lvm.o: disk/lvm.c $(disk/lvm.c_DEPENDENCIES)
199 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
200-include grub_probe-disk_lvm.d
201
ccaa8a5f 202grub_probe-grub_probe_init.o: grub_probe_init.c $(grub_probe_init.c_DEPENDENCIES)
203 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_probe_CFLAGS) -MD -c -o $@ $<
204-include grub_probe-grub_probe_init.d
205
206
c32865bf 207ifeq ($(enable_grub_fstest), yes)
208bin_UTILITIES += grub-fstest
209endif
210
211# For grub-fstest.
212util/grub-fstest.c_DEPENDENCIES = grub_fstest_init.h
213grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \
214 kern/file.c kern/device.c kern/disk.c kern/err.c kern/misc.c \
215 disk/host.c disk/loopback.c normal/arg.c normal/misc.c \
5ed20adc 216 lib/hexdump.c lib/crc.c commands/blocklist.c commands/ls.c \
c32865bf 217 \
218 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
0d16e571 219 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
c32865bf 220 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
f821ce59 221 fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \
c32865bf 222 \
223 kern/partition.c partmap/pc.c partmap/apple.c partmap/gpt.c \
0bb5115e 224 kern/fs.c kern/env.c fs/fshelp.c disk/raid.c \
5ed20adc 225 disk/raid5_recover.c disk/raid6_recover.c \
0bb5115e 226 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
c32865bf 227 grub_fstest_init.c
f821ce59 228CLEANFILES += grub-fstest$(EXEEXT) grub_fstest-util_grub_fstest.o grub_fstest-util_hostfs.o grub_fstest-util_misc.o grub_fstest-kern_file.o grub_fstest-kern_device.o grub_fstest-kern_disk.o grub_fstest-kern_err.o grub_fstest-kern_misc.o grub_fstest-disk_host.o grub_fstest-disk_loopback.o grub_fstest-normal_arg.o grub_fstest-normal_misc.o grub_fstest-lib_hexdump.o grub_fstest-lib_crc.o grub_fstest-commands_blocklist.o grub_fstest-commands_ls.o grub_fstest-fs_affs.o grub_fstest-fs_cpio.o grub_fstest-fs_ext2.o grub_fstest-fs_fat.o grub_fstest-fs_hfs.o grub_fstest-fs_hfsplus.o grub_fstest-fs_iso9660.o grub_fstest-fs_udf.o grub_fstest-fs_jfs.o grub_fstest-fs_minix.o grub_fstest-fs_ntfs.o grub_fstest-fs_ntfscomp.o grub_fstest-fs_reiserfs.o grub_fstest-fs_sfs.o grub_fstest-fs_ufs.o grub_fstest-fs_xfs.o grub_fstest-fs_afs.o grub_fstest-fs_tar.o grub_fstest-kern_partition.o grub_fstest-partmap_pc.o grub_fstest-partmap_apple.o grub_fstest-partmap_gpt.o grub_fstest-kern_fs.o grub_fstest-kern_env.o grub_fstest-fs_fshelp.o grub_fstest-disk_raid.o grub_fstest-disk_raid5_recover.o grub_fstest-disk_raid6_recover.o grub_fstest-disk_mdraid_linux.o grub_fstest-disk_dmraid_nvidia.o grub_fstest-disk_lvm.o grub_fstest-grub_fstest_init.o
229MOSTLYCLEANFILES += grub_fstest-util_grub_fstest.d grub_fstest-util_hostfs.d grub_fstest-util_misc.d grub_fstest-kern_file.d grub_fstest-kern_device.d grub_fstest-kern_disk.d grub_fstest-kern_err.d grub_fstest-kern_misc.d grub_fstest-disk_host.d grub_fstest-disk_loopback.d grub_fstest-normal_arg.d grub_fstest-normal_misc.d grub_fstest-lib_hexdump.d grub_fstest-lib_crc.d grub_fstest-commands_blocklist.d grub_fstest-commands_ls.d grub_fstest-fs_affs.d grub_fstest-fs_cpio.d grub_fstest-fs_ext2.d grub_fstest-fs_fat.d grub_fstest-fs_hfs.d grub_fstest-fs_hfsplus.d grub_fstest-fs_iso9660.d grub_fstest-fs_udf.d grub_fstest-fs_jfs.d grub_fstest-fs_minix.d grub_fstest-fs_ntfs.d grub_fstest-fs_ntfscomp.d grub_fstest-fs_reiserfs.d grub_fstest-fs_sfs.d grub_fstest-fs_ufs.d grub_fstest-fs_xfs.d grub_fstest-fs_afs.d grub_fstest-fs_tar.d grub_fstest-kern_partition.d grub_fstest-partmap_pc.d grub_fstest-partmap_apple.d grub_fstest-partmap_gpt.d grub_fstest-kern_fs.d grub_fstest-kern_env.d grub_fstest-fs_fshelp.d grub_fstest-disk_raid.d grub_fstest-disk_raid5_recover.d grub_fstest-disk_raid6_recover.d grub_fstest-disk_mdraid_linux.d grub_fstest-disk_dmraid_nvidia.d grub_fstest-disk_lvm.d grub_fstest-grub_fstest_init.d
c32865bf 230
f821ce59 231grub-fstest: $(grub_fstest_DEPENDENCIES) grub_fstest-util_grub_fstest.o grub_fstest-util_hostfs.o grub_fstest-util_misc.o grub_fstest-kern_file.o grub_fstest-kern_device.o grub_fstest-kern_disk.o grub_fstest-kern_err.o grub_fstest-kern_misc.o grub_fstest-disk_host.o grub_fstest-disk_loopback.o grub_fstest-normal_arg.o grub_fstest-normal_misc.o grub_fstest-lib_hexdump.o grub_fstest-lib_crc.o grub_fstest-commands_blocklist.o grub_fstest-commands_ls.o grub_fstest-fs_affs.o grub_fstest-fs_cpio.o grub_fstest-fs_ext2.o grub_fstest-fs_fat.o grub_fstest-fs_hfs.o grub_fstest-fs_hfsplus.o grub_fstest-fs_iso9660.o grub_fstest-fs_udf.o grub_fstest-fs_jfs.o grub_fstest-fs_minix.o grub_fstest-fs_ntfs.o grub_fstest-fs_ntfscomp.o grub_fstest-fs_reiserfs.o grub_fstest-fs_sfs.o grub_fstest-fs_ufs.o grub_fstest-fs_xfs.o grub_fstest-fs_afs.o grub_fstest-fs_tar.o grub_fstest-kern_partition.o grub_fstest-partmap_pc.o grub_fstest-partmap_apple.o grub_fstest-partmap_gpt.o grub_fstest-kern_fs.o grub_fstest-kern_env.o grub_fstest-fs_fshelp.o grub_fstest-disk_raid.o grub_fstest-disk_raid5_recover.o grub_fstest-disk_raid6_recover.o grub_fstest-disk_mdraid_linux.o grub_fstest-disk_dmraid_nvidia.o grub_fstest-disk_lvm.o grub_fstest-grub_fstest_init.o
232 $(CC) -o $@ grub_fstest-util_grub_fstest.o grub_fstest-util_hostfs.o grub_fstest-util_misc.o grub_fstest-kern_file.o grub_fstest-kern_device.o grub_fstest-kern_disk.o grub_fstest-kern_err.o grub_fstest-kern_misc.o grub_fstest-disk_host.o grub_fstest-disk_loopback.o grub_fstest-normal_arg.o grub_fstest-normal_misc.o grub_fstest-lib_hexdump.o grub_fstest-lib_crc.o grub_fstest-commands_blocklist.o grub_fstest-commands_ls.o grub_fstest-fs_affs.o grub_fstest-fs_cpio.o grub_fstest-fs_ext2.o grub_fstest-fs_fat.o grub_fstest-fs_hfs.o grub_fstest-fs_hfsplus.o grub_fstest-fs_iso9660.o grub_fstest-fs_udf.o grub_fstest-fs_jfs.o grub_fstest-fs_minix.o grub_fstest-fs_ntfs.o grub_fstest-fs_ntfscomp.o grub_fstest-fs_reiserfs.o grub_fstest-fs_sfs.o grub_fstest-fs_ufs.o grub_fstest-fs_xfs.o grub_fstest-fs_afs.o grub_fstest-fs_tar.o grub_fstest-kern_partition.o grub_fstest-partmap_pc.o grub_fstest-partmap_apple.o grub_fstest-partmap_gpt.o grub_fstest-kern_fs.o grub_fstest-kern_env.o grub_fstest-fs_fshelp.o grub_fstest-disk_raid.o grub_fstest-disk_raid5_recover.o grub_fstest-disk_raid6_recover.o grub_fstest-disk_mdraid_linux.o grub_fstest-disk_dmraid_nvidia.o grub_fstest-disk_lvm.o grub_fstest-grub_fstest_init.o $(LDFLAGS) $(grub_fstest_LDFLAGS)
c32865bf 233
234grub_fstest-util_grub_fstest.o: util/grub-fstest.c $(util/grub-fstest.c_DEPENDENCIES)
235 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
236-include grub_fstest-util_grub_fstest.d
237
238grub_fstest-util_hostfs.o: util/hostfs.c $(util/hostfs.c_DEPENDENCIES)
239 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
240-include grub_fstest-util_hostfs.d
241
242grub_fstest-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
243 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
244-include grub_fstest-util_misc.d
245
246grub_fstest-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
247 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
248-include grub_fstest-kern_file.d
249
250grub_fstest-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
251 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
252-include grub_fstest-kern_device.d
253
254grub_fstest-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
255 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
256-include grub_fstest-kern_disk.d
257
258grub_fstest-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
259 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
260-include grub_fstest-kern_err.d
261
262grub_fstest-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
263 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
264-include grub_fstest-kern_misc.d
265
266grub_fstest-disk_host.o: disk/host.c $(disk/host.c_DEPENDENCIES)
267 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
268-include grub_fstest-disk_host.d
269
270grub_fstest-disk_loopback.o: disk/loopback.c $(disk/loopback.c_DEPENDENCIES)
271 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
272-include grub_fstest-disk_loopback.d
273
274grub_fstest-normal_arg.o: normal/arg.c $(normal/arg.c_DEPENDENCIES)
275 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
276-include grub_fstest-normal_arg.d
277
278grub_fstest-normal_misc.o: normal/misc.c $(normal/misc.c_DEPENDENCIES)
279 $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
280-include grub_fstest-normal_misc.d
281
a85cd5a0 282grub_fstest-lib_hexdump.o: lib/hexdump.c $(lib/hexdump.c_DEPENDENCIES)
283 $(CC) -Ilib -I$(srcdir)/lib $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
284-include grub_fstest-lib_hexdump.d
c32865bf 285
5ed20adc 286grub_fstest-lib_crc.o: lib/crc.c $(lib/crc.c_DEPENDENCIES)
287 $(CC) -Ilib -I$(srcdir)/lib $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
288-include grub_fstest-lib_crc.d
289
c32865bf 290grub_fstest-commands_blocklist.o: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES)
291 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
292-include grub_fstest-commands_blocklist.d
293
294grub_fstest-commands_ls.o: commands/ls.c $(commands/ls.c_DEPENDENCIES)
295 $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
296-include grub_fstest-commands_ls.d
297
298grub_fstest-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
299 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
300-include grub_fstest-fs_affs.d
301
302grub_fstest-fs_cpio.o: fs/cpio.c $(fs/cpio.c_DEPENDENCIES)
303 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
304-include grub_fstest-fs_cpio.d
305
306grub_fstest-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
307 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
308-include grub_fstest-fs_ext2.d
309
310grub_fstest-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
311 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
312-include grub_fstest-fs_fat.d
313
314grub_fstest-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
315 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
316-include grub_fstest-fs_hfs.d
317
318grub_fstest-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
319 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
320-include grub_fstest-fs_hfsplus.d
321
322grub_fstest-fs_iso9660.o: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES)
323 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
324-include grub_fstest-fs_iso9660.d
325
0d16e571 326grub_fstest-fs_udf.o: fs/udf.c $(fs/udf.c_DEPENDENCIES)
327 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
328-include grub_fstest-fs_udf.d
329
c32865bf 330grub_fstest-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
331 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
332-include grub_fstest-fs_jfs.d
333
334grub_fstest-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
335 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
336-include grub_fstest-fs_minix.d
337
338grub_fstest-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
339 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
340-include grub_fstest-fs_ntfs.d
341
342grub_fstest-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
343 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
344-include grub_fstest-fs_ntfscomp.d
345
346grub_fstest-fs_reiserfs.o: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES)
347 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
348-include grub_fstest-fs_reiserfs.d
349
350grub_fstest-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
351 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
352-include grub_fstest-fs_sfs.d
353
354grub_fstest-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
355 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
356-include grub_fstest-fs_ufs.d
357
358grub_fstest-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
359 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
360-include grub_fstest-fs_xfs.d
361
86cb4f54 362grub_fstest-fs_afs.o: fs/afs.c $(fs/afs.c_DEPENDENCIES)
363 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
364-include grub_fstest-fs_afs.d
365
f821ce59 366grub_fstest-fs_tar.o: fs/tar.c $(fs/tar.c_DEPENDENCIES)
367 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
368-include grub_fstest-fs_tar.d
369
c32865bf 370grub_fstest-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
371 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
372-include grub_fstest-kern_partition.d
373
374grub_fstest-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
375 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
376-include grub_fstest-partmap_pc.d
377
378grub_fstest-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
379 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
380-include grub_fstest-partmap_apple.d
381
382grub_fstest-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
383 $(CC) -Ipartmap -I$(srcdir)/partmap $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
384-include grub_fstest-partmap_gpt.d
385
386grub_fstest-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
387 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
388-include grub_fstest-kern_fs.d
389
390grub_fstest-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
391 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
392-include grub_fstest-kern_env.d
393
394grub_fstest-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
395 $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
396-include grub_fstest-fs_fshelp.d
397
c32865bf 398grub_fstest-disk_raid.o: disk/raid.c $(disk/raid.c_DEPENDENCIES)
399 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
400-include grub_fstest-disk_raid.d
401
5ed20adc 402grub_fstest-disk_raid5_recover.o: disk/raid5_recover.c $(disk/raid5_recover.c_DEPENDENCIES)
403 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
404-include grub_fstest-disk_raid5_recover.d
405
406grub_fstest-disk_raid6_recover.o: disk/raid6_recover.c $(disk/raid6_recover.c_DEPENDENCIES)
407 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
408-include grub_fstest-disk_raid6_recover.d
409
410grub_fstest-disk_mdraid_linux.o: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES)
411 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
412-include grub_fstest-disk_mdraid_linux.d
413
414grub_fstest-disk_dmraid_nvidia.o: disk/dmraid_nvidia.c $(disk/dmraid_nvidia.c_DEPENDENCIES)
415 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
416-include grub_fstest-disk_dmraid_nvidia.d
417
0bb5115e 418grub_fstest-disk_lvm.o: disk/lvm.c $(disk/lvm.c_DEPENDENCIES)
419 $(CC) -Idisk -I$(srcdir)/disk $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
420-include grub_fstest-disk_lvm.d
421
c32865bf 422grub_fstest-grub_fstest_init.o: grub_fstest_init.c $(grub_fstest_init.c_DEPENDENCIES)
423 $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_fstest_CFLAGS) -MD -c -o $@ $<
424-include grub_fstest-grub_fstest_init.d
425
426
e52db1f7 427# For grub-mkfont.
428ifeq ($(enable_grub_mkfont), yes)
429bin_UTILITIES += grub-mkfont
430grub_mkfont_SOURCES = util/grub-mkfont.c util/misc.c
431CLEANFILES += grub-mkfont$(EXEEXT) grub_mkfont-util_grub_mkfont.o grub_mkfont-util_misc.o
432MOSTLYCLEANFILES += grub_mkfont-util_grub_mkfont.d grub_mkfont-util_misc.d
433
434grub-mkfont: $(grub_mkfont_DEPENDENCIES) grub_mkfont-util_grub_mkfont.o grub_mkfont-util_misc.o
435 $(CC) -o $@ grub_mkfont-util_grub_mkfont.o grub_mkfont-util_misc.o $(LDFLAGS) $(grub_mkfont_LDFLAGS)
436
437grub_mkfont-util_grub_mkfont.o: util/grub-mkfont.c $(util/grub-mkfont.c_DEPENDENCIES)
438 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkfont_CFLAGS) -MD -c -o $@ $<
439-include grub_mkfont-util_grub_mkfont.d
440
441grub_mkfont-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
442 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkfont_CFLAGS) -MD -c -o $@ $<
443-include grub_mkfont-util_misc.d
444
445grub_mkfont_CFLAGS = $(freetype_cflags)
446grub_mkfont_LDFLAGS = $(freetype_libs)
447endif
448
233b1628 449# For the parser.
450grub_script.tab.c grub_script.tab.h: normal/parser.y
451 $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
befaed6c 452DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
233b1628 453
454# For grub-emu.
daf0f0ba 455grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
cfca1cfd 456 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
daf0f0ba 457DISTCLEANFILES += grub_emu_init.lst
233b1628 458
daf0f0ba 459grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
460 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
461DISTCLEANFILES += grub_emu_init.h
233b1628 462
daf0f0ba 463grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
464 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
befaed6c 465DISTCLEANFILES += grub_emu_init.c
233b1628 466
daf0f0ba 467# For grub-probe.
468grub_probe_init.lst: geninit.sh $(filter-out grub_probe_init.c,$(grub_probe_SOURCES))
469 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
470DISTCLEANFILES += grub_probe_init.lst
471
472grub_probe_init.h: grub_probe_init.lst $(filter-out grub_probe_init.c,$(grub_probe_SOURCES)) geninitheader.sh
473 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
474DISTCLEANFILES += grub_probe_init.h
475
476grub_probe_init.c: grub_probe_init.lst $(filter-out grub_probe_init.c,$(grub_probe_SOURCES)) geninit.sh grub_probe_init.h
477 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
478DISTCLEANFILES += grub_probe_init.c
479
480# For grub-setup.
481grub_setup_init.lst: geninit.sh $(filter-out grub_setup_init.c,$(grub_setup_SOURCES))
482 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
483DISTCLEANFILES += grub_setup_init.lst
484
485grub_setup_init.h: grub_setup_init.lst $(filter-out grub_setup_init.c,$(grub_setup_SOURCES)) geninitheader.sh
486 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
487DISTCLEANFILES += grub_setup_init.h
488
489grub_setup_init.c: grub_setup_init.lst $(filter-out grub_setup_init.c,$(grub_setup_SOURCES)) geninit.sh grub_setup_init.h
490 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
491DISTCLEANFILES += grub_setup_init.c
492
99fadbaa 493# For grub-fstest.
494grub_fstest_init.lst: geninit.sh $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES))
495 rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
496DISTCLEANFILES += grub_fstest_init.lst
497
498grub_fstest_init.h: grub_fstest_init.lst $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES)) geninitheader.sh
499 rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
500DISTCLEANFILES += grub_fstest_init.h
501
502grub_fstest_init.c: grub_fstest_init.lst $(filter-out grub_fstest_init.c,$(grub_fstest_SOURCES)) geninit.sh grub_fstest_init.h
503 rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
504DISTCLEANFILES += grub_fstest_init.c
505
2270f77b 506# for grub-editenv
507bin_UTILITIES += grub-editenv
a85cd5a0 508grub_editenv_SOURCES = util/grub-editenv.c lib/envblk.c util/misc.c kern/misc.c kern/err.c
509CLEANFILES += grub-editenv$(EXEEXT) grub_editenv-util_grub_editenv.o grub_editenv-lib_envblk.o grub_editenv-util_misc.o grub_editenv-kern_misc.o grub_editenv-kern_err.o
510MOSTLYCLEANFILES += grub_editenv-util_grub_editenv.d grub_editenv-lib_envblk.d grub_editenv-util_misc.d grub_editenv-kern_misc.d grub_editenv-kern_err.d
2270f77b 511
a85cd5a0 512grub-editenv: $(grub_editenv_DEPENDENCIES) grub_editenv-util_grub_editenv.o grub_editenv-lib_envblk.o grub_editenv-util_misc.o grub_editenv-kern_misc.o grub_editenv-kern_err.o
513 $(CC) -o $@ grub_editenv-util_grub_editenv.o grub_editenv-lib_envblk.o grub_editenv-util_misc.o grub_editenv-kern_misc.o grub_editenv-kern_err.o $(LDFLAGS) $(grub_editenv_LDFLAGS)
2270f77b 514
515grub_editenv-util_grub_editenv.o: util/grub-editenv.c $(util/grub-editenv.c_DEPENDENCIES)
516 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_editenv_CFLAGS) -MD -c -o $@ $<
517-include grub_editenv-util_grub_editenv.d
518
a85cd5a0 519grub_editenv-lib_envblk.o: lib/envblk.c $(lib/envblk.c_DEPENDENCIES)
520 $(CC) -Ilib -I$(srcdir)/lib $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_editenv_CFLAGS) -MD -c -o $@ $<
521-include grub_editenv-lib_envblk.d
2270f77b 522
523grub_editenv-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
524 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_editenv_CFLAGS) -MD -c -o $@ $<
525-include grub_editenv-util_misc.d
526
527grub_editenv-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
528 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_editenv_CFLAGS) -MD -c -o $@ $<
529-include grub_editenv-kern_misc.d
530
531grub_editenv-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
532 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_editenv_CFLAGS) -MD -c -o $@ $<
533-include grub_editenv-kern_err.d
534
535CLEANFILES += grub-editenv
536
2a8a80e4 537# for grub-pe2elf
2d05bc6a 538ifeq ($(enable_grub_pe2elf), yes)
2a8a80e4 539bin_UTILITIES += grub-pe2elf
2d05bc6a 540endif
541
2a8a80e4 542grub_pe2elf_SOURCES = util/grub-pe2elf.c util/misc.c
543CLEANFILES += grub-pe2elf$(EXEEXT) grub_pe2elf-util_grub_pe2elf.o grub_pe2elf-util_misc.o
544MOSTLYCLEANFILES += grub_pe2elf-util_grub_pe2elf.d grub_pe2elf-util_misc.d
545
546grub-pe2elf: $(grub_pe2elf_DEPENDENCIES) grub_pe2elf-util_grub_pe2elf.o grub_pe2elf-util_misc.o
547 $(CC) -o $@ grub_pe2elf-util_grub_pe2elf.o grub_pe2elf-util_misc.o $(LDFLAGS) $(grub_pe2elf_LDFLAGS)
548
549grub_pe2elf-util_grub_pe2elf.o: util/grub-pe2elf.c $(util/grub-pe2elf.c_DEPENDENCIES)
550 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_pe2elf_CFLAGS) -MD -c -o $@ $<
551-include grub_pe2elf-util_grub_pe2elf.d
552
553grub_pe2elf-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
554 $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_pe2elf_CFLAGS) -MD -c -o $@ $<
555-include grub_pe2elf-util_misc.d
556
557CLEANFILES += grub-pe2elf
558
18ade780 559# For grub-mkconfig
560grub-mkconfig: util/grub-mkconfig.in config.status
ebd97f6e 561 ./config.status --file=$@:$<
562 chmod +x $@
18ade780 563sbin_SCRIPTS += grub-mkconfig
564CLEANFILES += grub-mkconfig
565
566grub-mkconfig_lib: util/grub-mkconfig_lib.in config.status
567 ./config.status --file=$@:$<
568 chmod +x $@
569lib_DATA += grub-mkconfig_lib
570CLEANFILES += grub-mkconfig_lib
ebd97f6e 571
fb36dc26 572update-grub_lib: util/update-grub_lib.in config.status
573 ./config.status --file=$@:$<
574 chmod +x $@
575lib_DATA += update-grub_lib
576CLEANFILES += update-grub_lib
577
d49a4cf6 578%: util/grub.d/%.in config.status
ebd97f6e 579 ./config.status --file=$@:$<
580 chmod +x $@
96e5d876 581grub-mkconfig_SCRIPTS = 00_header 10_linux 10_hurd 10_freebsd 30_os-prober 40_custom
2d05bc6a 582ifeq ($(target_os), cygwin)
18ade780 583grub-mkconfig_SCRIPTS += 10_windows
2d05bc6a 584endif
585
18ade780 586CLEANFILES += $(grub-mkconfig_SCRIPTS)
78b51059 587
18ade780 588grub-mkconfig_DATA += util/grub.d/README
ebd97f6e 589
233b1628 590
591# Filing systems.
4931827f 592pkglib_MODULES += fshelp.mod fat.mod ufs.mod ext2.mod ntfs.mod \
4bc72aa9 593 ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \
f821ce59 594 affs.mod sfs.mod hfsplus.mod reiserfs.mod cpio.mod tar.mod \
595 udf.mod afs.mod
233b1628 596
597# For fshelp.mod.
598fshelp_mod_SOURCES = fs/fshelp.c
83709125 599CLEANFILES += fshelp.mod mod-fshelp.o mod-fshelp.c pre-fshelp.o fshelp_mod-fs_fshelp.o und-fshelp.lst
600ifneq ($(fshelp_mod_EXPORTS),no)
601CLEANFILES += def-fshelp.lst
233b1628 602DEFSYMFILES += def-fshelp.lst
83709125 603endif
604MOSTLYCLEANFILES += fshelp_mod-fs_fshelp.d
233b1628 605UNDSYMFILES += und-fshelp.lst
606
2a8a80e4 607fshelp.mod: pre-fshelp.o mod-fshelp.o $(TARGET_OBJ2ELF)
233b1628 608 -rm -f $@
2a8a80e4 609 $(TARGET_CC) $(fshelp_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-fshelp.o mod-fshelp.o
610 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
611 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 612
e02ac02c 613pre-fshelp.o: $(fshelp_mod_DEPENDENCIES) fshelp_mod-fs_fshelp.o
233b1628 614 -rm -f $@
e02ac02c 615 $(TARGET_CC) $(fshelp_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ fshelp_mod-fs_fshelp.o
233b1628 616
617mod-fshelp.o: mod-fshelp.c
b977bf01 618 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fshelp_mod_CFLAGS) -c -o $@ $<
233b1628 619
926b9823 620mod-fshelp.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 621 sh $(srcdir)/genmodsrc.sh 'fshelp' $< > $@ || (rm -f $@; exit 1)
622
83709125 623ifneq ($(fshelp_mod_EXPORTS),no)
233b1628 624def-fshelp.lst: pre-fshelp.o
625 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 fshelp/' > $@
83709125 626endif
233b1628 627
628und-fshelp.lst: pre-fshelp.o
629 echo 'fshelp' > $@
630 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
631
7d31f41f 632fshelp_mod-fs_fshelp.o: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES)
46e5e5cb 633 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fshelp_mod_CFLAGS) -MD -c -o $@ $<
233b1628 634-include fshelp_mod-fs_fshelp.d
635
228ffeab 636CLEANFILES += cmd-fshelp_mod-fs_fshelp.lst fs-fshelp_mod-fs_fshelp.lst partmap-fshelp_mod-fs_fshelp.lst
233b1628 637COMMANDFILES += cmd-fshelp_mod-fs_fshelp.lst
638FSFILES += fs-fshelp_mod-fs_fshelp.lst
228ffeab 639PARTMAPFILES += partmap-fshelp_mod-fs_fshelp.lst
233b1628 640
7d31f41f 641cmd-fshelp_mod-fs_fshelp.lst: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES) gencmdlist.sh
26c607b9 642 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fshelp_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh fshelp > $@ || (rm -f $@; exit 1)
233b1628 643
7d31f41f 644fs-fshelp_mod-fs_fshelp.lst: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES) genfslist.sh
26c607b9 645 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fshelp_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh fshelp > $@ || (rm -f $@; exit 1)
233b1628 646
228ffeab 647partmap-fshelp_mod-fs_fshelp.lst: fs/fshelp.c $(fs/fshelp.c_DEPENDENCIES) genpartmaplist.sh
648 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fshelp_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh fshelp > $@ || (rm -f $@; exit 1)
649
233b1628 650
651fshelp_mod_CFLAGS = $(COMMON_CFLAGS)
652fshelp_mod_LDFLAGS = $(COMMON_LDFLAGS)
653
654# For fat.mod.
655fat_mod_SOURCES = fs/fat.c
83709125 656CLEANFILES += fat.mod mod-fat.o mod-fat.c pre-fat.o fat_mod-fs_fat.o und-fat.lst
657ifneq ($(fat_mod_EXPORTS),no)
658CLEANFILES += def-fat.lst
233b1628 659DEFSYMFILES += def-fat.lst
83709125 660endif
661MOSTLYCLEANFILES += fat_mod-fs_fat.d
233b1628 662UNDSYMFILES += und-fat.lst
663
2a8a80e4 664fat.mod: pre-fat.o mod-fat.o $(TARGET_OBJ2ELF)
233b1628 665 -rm -f $@
2a8a80e4 666 $(TARGET_CC) $(fat_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-fat.o mod-fat.o
667 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
668 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 669
e02ac02c 670pre-fat.o: $(fat_mod_DEPENDENCIES) fat_mod-fs_fat.o
233b1628 671 -rm -f $@
e02ac02c 672 $(TARGET_CC) $(fat_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ fat_mod-fs_fat.o
233b1628 673
674mod-fat.o: mod-fat.c
b977bf01 675 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fat_mod_CFLAGS) -c -o $@ $<
233b1628 676
926b9823 677mod-fat.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 678 sh $(srcdir)/genmodsrc.sh 'fat' $< > $@ || (rm -f $@; exit 1)
679
83709125 680ifneq ($(fat_mod_EXPORTS),no)
233b1628 681def-fat.lst: pre-fat.o
682 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 fat/' > $@
83709125 683endif
233b1628 684
685und-fat.lst: pre-fat.o
686 echo 'fat' > $@
687 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
688
7d31f41f 689fat_mod-fs_fat.o: fs/fat.c $(fs/fat.c_DEPENDENCIES)
46e5e5cb 690 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fat_mod_CFLAGS) -MD -c -o $@ $<
233b1628 691-include fat_mod-fs_fat.d
692
228ffeab 693CLEANFILES += cmd-fat_mod-fs_fat.lst fs-fat_mod-fs_fat.lst partmap-fat_mod-fs_fat.lst
233b1628 694COMMANDFILES += cmd-fat_mod-fs_fat.lst
695FSFILES += fs-fat_mod-fs_fat.lst
228ffeab 696PARTMAPFILES += partmap-fat_mod-fs_fat.lst
233b1628 697
7d31f41f 698cmd-fat_mod-fs_fat.lst: fs/fat.c $(fs/fat.c_DEPENDENCIES) gencmdlist.sh
26c607b9 699 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fat_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh fat > $@ || (rm -f $@; exit 1)
233b1628 700
7d31f41f 701fs-fat_mod-fs_fat.lst: fs/fat.c $(fs/fat.c_DEPENDENCIES) genfslist.sh
26c607b9 702 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fat_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh fat > $@ || (rm -f $@; exit 1)
233b1628 703
228ffeab 704partmap-fat_mod-fs_fat.lst: fs/fat.c $(fs/fat.c_DEPENDENCIES) genpartmaplist.sh
705 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fat_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh fat > $@ || (rm -f $@; exit 1)
706
233b1628 707
708fat_mod_CFLAGS = $(COMMON_CFLAGS)
709fat_mod_LDFLAGS = $(COMMON_LDFLAGS)
710
711# For ufs.mod.
712ufs_mod_SOURCES = fs/ufs.c
83709125 713CLEANFILES += ufs.mod mod-ufs.o mod-ufs.c pre-ufs.o ufs_mod-fs_ufs.o und-ufs.lst
714ifneq ($(ufs_mod_EXPORTS),no)
715CLEANFILES += def-ufs.lst
233b1628 716DEFSYMFILES += def-ufs.lst
83709125 717endif
718MOSTLYCLEANFILES += ufs_mod-fs_ufs.d
233b1628 719UNDSYMFILES += und-ufs.lst
720
2a8a80e4 721ufs.mod: pre-ufs.o mod-ufs.o $(TARGET_OBJ2ELF)
233b1628 722 -rm -f $@
2a8a80e4 723 $(TARGET_CC) $(ufs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-ufs.o mod-ufs.o
724 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
725 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 726
e02ac02c 727pre-ufs.o: $(ufs_mod_DEPENDENCIES) ufs_mod-fs_ufs.o
233b1628 728 -rm -f $@
e02ac02c 729 $(TARGET_CC) $(ufs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ufs_mod-fs_ufs.o
233b1628 730
731mod-ufs.o: mod-ufs.c
b977bf01 732 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ufs_mod_CFLAGS) -c -o $@ $<
233b1628 733
926b9823 734mod-ufs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 735 sh $(srcdir)/genmodsrc.sh 'ufs' $< > $@ || (rm -f $@; exit 1)
736
83709125 737ifneq ($(ufs_mod_EXPORTS),no)
233b1628 738def-ufs.lst: pre-ufs.o
739 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ufs/' > $@
83709125 740endif
233b1628 741
742und-ufs.lst: pre-ufs.o
743 echo 'ufs' > $@
744 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
745
7d31f41f 746ufs_mod-fs_ufs.o: fs/ufs.c $(fs/ufs.c_DEPENDENCIES)
46e5e5cb 747 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ufs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 748-include ufs_mod-fs_ufs.d
749
228ffeab 750CLEANFILES += cmd-ufs_mod-fs_ufs.lst fs-ufs_mod-fs_ufs.lst partmap-ufs_mod-fs_ufs.lst
233b1628 751COMMANDFILES += cmd-ufs_mod-fs_ufs.lst
752FSFILES += fs-ufs_mod-fs_ufs.lst
228ffeab 753PARTMAPFILES += partmap-ufs_mod-fs_ufs.lst
233b1628 754
7d31f41f 755cmd-ufs_mod-fs_ufs.lst: fs/ufs.c $(fs/ufs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 756 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ufs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ufs > $@ || (rm -f $@; exit 1)
233b1628 757
7d31f41f 758fs-ufs_mod-fs_ufs.lst: fs/ufs.c $(fs/ufs.c_DEPENDENCIES) genfslist.sh
26c607b9 759 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ufs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ufs > $@ || (rm -f $@; exit 1)
233b1628 760
228ffeab 761partmap-ufs_mod-fs_ufs.lst: fs/ufs.c $(fs/ufs.c_DEPENDENCIES) genpartmaplist.sh
762 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ufs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh ufs > $@ || (rm -f $@; exit 1)
763
233b1628 764
765ufs_mod_CFLAGS = $(COMMON_CFLAGS)
766ufs_mod_LDFLAGS = $(COMMON_LDFLAGS)
767
768# For ext2.mod.
769ext2_mod_SOURCES = fs/ext2.c
83709125 770CLEANFILES += ext2.mod mod-ext2.o mod-ext2.c pre-ext2.o ext2_mod-fs_ext2.o und-ext2.lst
771ifneq ($(ext2_mod_EXPORTS),no)
772CLEANFILES += def-ext2.lst
233b1628 773DEFSYMFILES += def-ext2.lst
83709125 774endif
775MOSTLYCLEANFILES += ext2_mod-fs_ext2.d
233b1628 776UNDSYMFILES += und-ext2.lst
777
2a8a80e4 778ext2.mod: pre-ext2.o mod-ext2.o $(TARGET_OBJ2ELF)
233b1628 779 -rm -f $@
2a8a80e4 780 $(TARGET_CC) $(ext2_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-ext2.o mod-ext2.o
781 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
782 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 783
e02ac02c 784pre-ext2.o: $(ext2_mod_DEPENDENCIES) ext2_mod-fs_ext2.o
233b1628 785 -rm -f $@
e02ac02c 786 $(TARGET_CC) $(ext2_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ext2_mod-fs_ext2.o
233b1628 787
788mod-ext2.o: mod-ext2.c
b977bf01 789 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ext2_mod_CFLAGS) -c -o $@ $<
233b1628 790
926b9823 791mod-ext2.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 792 sh $(srcdir)/genmodsrc.sh 'ext2' $< > $@ || (rm -f $@; exit 1)
793
83709125 794ifneq ($(ext2_mod_EXPORTS),no)
233b1628 795def-ext2.lst: pre-ext2.o
796 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ext2/' > $@
83709125 797endif
233b1628 798
799und-ext2.lst: pre-ext2.o
800 echo 'ext2' > $@
801 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
802
7d31f41f 803ext2_mod-fs_ext2.o: fs/ext2.c $(fs/ext2.c_DEPENDENCIES)
46e5e5cb 804 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ext2_mod_CFLAGS) -MD -c -o $@ $<
233b1628 805-include ext2_mod-fs_ext2.d
806
228ffeab 807CLEANFILES += cmd-ext2_mod-fs_ext2.lst fs-ext2_mod-fs_ext2.lst partmap-ext2_mod-fs_ext2.lst
233b1628 808COMMANDFILES += cmd-ext2_mod-fs_ext2.lst
809FSFILES += fs-ext2_mod-fs_ext2.lst
228ffeab 810PARTMAPFILES += partmap-ext2_mod-fs_ext2.lst
233b1628 811
7d31f41f 812cmd-ext2_mod-fs_ext2.lst: fs/ext2.c $(fs/ext2.c_DEPENDENCIES) gencmdlist.sh
26c607b9 813 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ext2_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ext2 > $@ || (rm -f $@; exit 1)
233b1628 814
7d31f41f 815fs-ext2_mod-fs_ext2.lst: fs/ext2.c $(fs/ext2.c_DEPENDENCIES) genfslist.sh
26c607b9 816 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ext2_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ext2 > $@ || (rm -f $@; exit 1)
233b1628 817
228ffeab 818partmap-ext2_mod-fs_ext2.lst: fs/ext2.c $(fs/ext2.c_DEPENDENCIES) genpartmaplist.sh
819 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ext2_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh ext2 > $@ || (rm -f $@; exit 1)
820
233b1628 821
822ext2_mod_CFLAGS = $(COMMON_CFLAGS)
823ext2_mod_LDFLAGS = $(COMMON_LDFLAGS)
824
8f096014 825# For ntfs.mod.
826ntfs_mod_SOURCES = fs/ntfs.c
827CLEANFILES += ntfs.mod mod-ntfs.o mod-ntfs.c pre-ntfs.o ntfs_mod-fs_ntfs.o und-ntfs.lst
828ifneq ($(ntfs_mod_EXPORTS),no)
829CLEANFILES += def-ntfs.lst
830DEFSYMFILES += def-ntfs.lst
831endif
832MOSTLYCLEANFILES += ntfs_mod-fs_ntfs.d
833UNDSYMFILES += und-ntfs.lst
834
2a8a80e4 835ntfs.mod: pre-ntfs.o mod-ntfs.o $(TARGET_OBJ2ELF)
8f096014 836 -rm -f $@
2a8a80e4 837 $(TARGET_CC) $(ntfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-ntfs.o mod-ntfs.o
838 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
839 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
8f096014 840
841pre-ntfs.o: $(ntfs_mod_DEPENDENCIES) ntfs_mod-fs_ntfs.o
842 -rm -f $@
843 $(TARGET_CC) $(ntfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ntfs_mod-fs_ntfs.o
844
845mod-ntfs.o: mod-ntfs.c
846 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfs_mod_CFLAGS) -c -o $@ $<
847
926b9823 848mod-ntfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
8f096014 849 sh $(srcdir)/genmodsrc.sh 'ntfs' $< > $@ || (rm -f $@; exit 1)
850
851ifneq ($(ntfs_mod_EXPORTS),no)
852def-ntfs.lst: pre-ntfs.o
853 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ntfs/' > $@
854endif
855
856und-ntfs.lst: pre-ntfs.o
857 echo 'ntfs' > $@
858 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
859
7d31f41f 860ntfs_mod-fs_ntfs.o: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES)
46e5e5cb 861 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfs_mod_CFLAGS) -MD -c -o $@ $<
8f096014 862-include ntfs_mod-fs_ntfs.d
863
228ffeab 864CLEANFILES += cmd-ntfs_mod-fs_ntfs.lst fs-ntfs_mod-fs_ntfs.lst partmap-ntfs_mod-fs_ntfs.lst
8f096014 865COMMANDFILES += cmd-ntfs_mod-fs_ntfs.lst
866FSFILES += fs-ntfs_mod-fs_ntfs.lst
228ffeab 867PARTMAPFILES += partmap-ntfs_mod-fs_ntfs.lst
8f096014 868
7d31f41f 869cmd-ntfs_mod-fs_ntfs.lst: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES) gencmdlist.sh
8f096014 870 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ntfs > $@ || (rm -f $@; exit 1)
871
7d31f41f 872fs-ntfs_mod-fs_ntfs.lst: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES) genfslist.sh
8f096014 873 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ntfs > $@ || (rm -f $@; exit 1)
874
228ffeab 875partmap-ntfs_mod-fs_ntfs.lst: fs/ntfs.c $(fs/ntfs.c_DEPENDENCIES) genpartmaplist.sh
876 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh ntfs > $@ || (rm -f $@; exit 1)
877
8f096014 878
879ntfs_mod_CFLAGS = $(COMMON_CFLAGS)
880ntfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
881
4bc72aa9 882# For ntfscomp.mod.
883ntfscomp_mod_SOURCES = fs/ntfscomp.c
884CLEANFILES += ntfscomp.mod mod-ntfscomp.o mod-ntfscomp.c pre-ntfscomp.o ntfscomp_mod-fs_ntfscomp.o und-ntfscomp.lst
885ifneq ($(ntfscomp_mod_EXPORTS),no)
886CLEANFILES += def-ntfscomp.lst
887DEFSYMFILES += def-ntfscomp.lst
888endif
889MOSTLYCLEANFILES += ntfscomp_mod-fs_ntfscomp.d
890UNDSYMFILES += und-ntfscomp.lst
891
2a8a80e4 892ntfscomp.mod: pre-ntfscomp.o mod-ntfscomp.o $(TARGET_OBJ2ELF)
4bc72aa9 893 -rm -f $@
2a8a80e4 894 $(TARGET_CC) $(ntfscomp_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-ntfscomp.o mod-ntfscomp.o
895 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
896 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
4bc72aa9 897
898pre-ntfscomp.o: $(ntfscomp_mod_DEPENDENCIES) ntfscomp_mod-fs_ntfscomp.o
899 -rm -f $@
900 $(TARGET_CC) $(ntfscomp_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ntfscomp_mod-fs_ntfscomp.o
901
902mod-ntfscomp.o: mod-ntfscomp.c
903 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfscomp_mod_CFLAGS) -c -o $@ $<
904
926b9823 905mod-ntfscomp.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
4bc72aa9 906 sh $(srcdir)/genmodsrc.sh 'ntfscomp' $< > $@ || (rm -f $@; exit 1)
907
908ifneq ($(ntfscomp_mod_EXPORTS),no)
909def-ntfscomp.lst: pre-ntfscomp.o
910 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ntfscomp/' > $@
911endif
912
913und-ntfscomp.lst: pre-ntfscomp.o
914 echo 'ntfscomp' > $@
915 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
916
7d31f41f 917ntfscomp_mod-fs_ntfscomp.o: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES)
4bc72aa9 918 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfscomp_mod_CFLAGS) -MD -c -o $@ $<
919-include ntfscomp_mod-fs_ntfscomp.d
920
228ffeab 921CLEANFILES += cmd-ntfscomp_mod-fs_ntfscomp.lst fs-ntfscomp_mod-fs_ntfscomp.lst partmap-ntfscomp_mod-fs_ntfscomp.lst
4bc72aa9 922COMMANDFILES += cmd-ntfscomp_mod-fs_ntfscomp.lst
923FSFILES += fs-ntfscomp_mod-fs_ntfscomp.lst
228ffeab 924PARTMAPFILES += partmap-ntfscomp_mod-fs_ntfscomp.lst
4bc72aa9 925
7d31f41f 926cmd-ntfscomp_mod-fs_ntfscomp.lst: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES) gencmdlist.sh
4bc72aa9 927 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfscomp_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ntfscomp > $@ || (rm -f $@; exit 1)
928
7d31f41f 929fs-ntfscomp_mod-fs_ntfscomp.lst: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES) genfslist.sh
4bc72aa9 930 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfscomp_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ntfscomp > $@ || (rm -f $@; exit 1)
931
228ffeab 932partmap-ntfscomp_mod-fs_ntfscomp.lst: fs/ntfscomp.c $(fs/ntfscomp.c_DEPENDENCIES) genpartmaplist.sh
933 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ntfscomp_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh ntfscomp > $@ || (rm -f $@; exit 1)
934
4bc72aa9 935
936ntfscomp_mod_CFLAGS = $(COMMON_CFLAGS)
937ntfscomp_mod_LDFLAGS = $(COMMON_LDFLAGS)
938
233b1628 939# For minix.mod.
940minix_mod_SOURCES = fs/minix.c
83709125 941CLEANFILES += minix.mod mod-minix.o mod-minix.c pre-minix.o minix_mod-fs_minix.o und-minix.lst
942ifneq ($(minix_mod_EXPORTS),no)
943CLEANFILES += def-minix.lst
233b1628 944DEFSYMFILES += def-minix.lst
83709125 945endif
946MOSTLYCLEANFILES += minix_mod-fs_minix.d
233b1628 947UNDSYMFILES += und-minix.lst
948
2a8a80e4 949minix.mod: pre-minix.o mod-minix.o $(TARGET_OBJ2ELF)
233b1628 950 -rm -f $@
2a8a80e4 951 $(TARGET_CC) $(minix_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-minix.o mod-minix.o
952 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
953 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 954
e02ac02c 955pre-minix.o: $(minix_mod_DEPENDENCIES) minix_mod-fs_minix.o
233b1628 956 -rm -f $@
e02ac02c 957 $(TARGET_CC) $(minix_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ minix_mod-fs_minix.o
233b1628 958
959mod-minix.o: mod-minix.c
b977bf01 960 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(minix_mod_CFLAGS) -c -o $@ $<
233b1628 961
926b9823 962mod-minix.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 963 sh $(srcdir)/genmodsrc.sh 'minix' $< > $@ || (rm -f $@; exit 1)
964
83709125 965ifneq ($(minix_mod_EXPORTS),no)
233b1628 966def-minix.lst: pre-minix.o
967 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 minix/' > $@
83709125 968endif
233b1628 969
970und-minix.lst: pre-minix.o
971 echo 'minix' > $@
972 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
973
7d31f41f 974minix_mod-fs_minix.o: fs/minix.c $(fs/minix.c_DEPENDENCIES)
46e5e5cb 975 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(minix_mod_CFLAGS) -MD -c -o $@ $<
233b1628 976-include minix_mod-fs_minix.d
977
228ffeab 978CLEANFILES += cmd-minix_mod-fs_minix.lst fs-minix_mod-fs_minix.lst partmap-minix_mod-fs_minix.lst
233b1628 979COMMANDFILES += cmd-minix_mod-fs_minix.lst
980FSFILES += fs-minix_mod-fs_minix.lst
228ffeab 981PARTMAPFILES += partmap-minix_mod-fs_minix.lst
233b1628 982
7d31f41f 983cmd-minix_mod-fs_minix.lst: fs/minix.c $(fs/minix.c_DEPENDENCIES) gencmdlist.sh
26c607b9 984 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(minix_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh minix > $@ || (rm -f $@; exit 1)
233b1628 985
7d31f41f 986fs-minix_mod-fs_minix.lst: fs/minix.c $(fs/minix.c_DEPENDENCIES) genfslist.sh
26c607b9 987 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(minix_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh minix > $@ || (rm -f $@; exit 1)
233b1628 988
228ffeab 989partmap-minix_mod-fs_minix.lst: fs/minix.c $(fs/minix.c_DEPENDENCIES) genpartmaplist.sh
990 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(minix_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh minix > $@ || (rm -f $@; exit 1)
991
233b1628 992
993minix_mod_CFLAGS = $(COMMON_CFLAGS)
994minix_mod_LDFLAGS = $(COMMON_LDFLAGS)
995
996# For hfs.mod.
997hfs_mod_SOURCES = fs/hfs.c
83709125 998CLEANFILES += hfs.mod mod-hfs.o mod-hfs.c pre-hfs.o hfs_mod-fs_hfs.o und-hfs.lst
999ifneq ($(hfs_mod_EXPORTS),no)
1000CLEANFILES += def-hfs.lst
233b1628 1001DEFSYMFILES += def-hfs.lst
83709125 1002endif
1003MOSTLYCLEANFILES += hfs_mod-fs_hfs.d
233b1628 1004UNDSYMFILES += und-hfs.lst
1005
2a8a80e4 1006hfs.mod: pre-hfs.o mod-hfs.o $(TARGET_OBJ2ELF)
233b1628 1007 -rm -f $@
2a8a80e4 1008 $(TARGET_CC) $(hfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-hfs.o mod-hfs.o
1009 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1010 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1011
e02ac02c 1012pre-hfs.o: $(hfs_mod_DEPENDENCIES) hfs_mod-fs_hfs.o
233b1628 1013 -rm -f $@
e02ac02c 1014 $(TARGET_CC) $(hfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hfs_mod-fs_hfs.o
233b1628 1015
1016mod-hfs.o: mod-hfs.c
b977bf01 1017 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfs_mod_CFLAGS) -c -o $@ $<
233b1628 1018
926b9823 1019mod-hfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1020 sh $(srcdir)/genmodsrc.sh 'hfs' $< > $@ || (rm -f $@; exit 1)
1021
83709125 1022ifneq ($(hfs_mod_EXPORTS),no)
233b1628 1023def-hfs.lst: pre-hfs.o
1024 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hfs/' > $@
83709125 1025endif
233b1628 1026
1027und-hfs.lst: pre-hfs.o
1028 echo 'hfs' > $@
1029 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1030
7d31f41f 1031hfs_mod-fs_hfs.o: fs/hfs.c $(fs/hfs.c_DEPENDENCIES)
46e5e5cb 1032 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1033-include hfs_mod-fs_hfs.d
1034
228ffeab 1035CLEANFILES += cmd-hfs_mod-fs_hfs.lst fs-hfs_mod-fs_hfs.lst partmap-hfs_mod-fs_hfs.lst
233b1628 1036COMMANDFILES += cmd-hfs_mod-fs_hfs.lst
1037FSFILES += fs-hfs_mod-fs_hfs.lst
228ffeab 1038PARTMAPFILES += partmap-hfs_mod-fs_hfs.lst
233b1628 1039
7d31f41f 1040cmd-hfs_mod-fs_hfs.lst: fs/hfs.c $(fs/hfs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1041 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh hfs > $@ || (rm -f $@; exit 1)
233b1628 1042
7d31f41f 1043fs-hfs_mod-fs_hfs.lst: fs/hfs.c $(fs/hfs.c_DEPENDENCIES) genfslist.sh
26c607b9 1044 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh hfs > $@ || (rm -f $@; exit 1)
233b1628 1045
228ffeab 1046partmap-hfs_mod-fs_hfs.lst: fs/hfs.c $(fs/hfs.c_DEPENDENCIES) genpartmaplist.sh
1047 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh hfs > $@ || (rm -f $@; exit 1)
1048
233b1628 1049
1050hfs_mod_CFLAGS = $(COMMON_CFLAGS)
1051hfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1052
1053# For jfs.mod.
1054jfs_mod_SOURCES = fs/jfs.c
83709125 1055CLEANFILES += jfs.mod mod-jfs.o mod-jfs.c pre-jfs.o jfs_mod-fs_jfs.o und-jfs.lst
1056ifneq ($(jfs_mod_EXPORTS),no)
1057CLEANFILES += def-jfs.lst
233b1628 1058DEFSYMFILES += def-jfs.lst
83709125 1059endif
1060MOSTLYCLEANFILES += jfs_mod-fs_jfs.d
233b1628 1061UNDSYMFILES += und-jfs.lst
1062
2a8a80e4 1063jfs.mod: pre-jfs.o mod-jfs.o $(TARGET_OBJ2ELF)
233b1628 1064 -rm -f $@
2a8a80e4 1065 $(TARGET_CC) $(jfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-jfs.o mod-jfs.o
1066 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1067 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1068
e02ac02c 1069pre-jfs.o: $(jfs_mod_DEPENDENCIES) jfs_mod-fs_jfs.o
233b1628 1070 -rm -f $@
e02ac02c 1071 $(TARGET_CC) $(jfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ jfs_mod-fs_jfs.o
233b1628 1072
1073mod-jfs.o: mod-jfs.c
b977bf01 1074 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jfs_mod_CFLAGS) -c -o $@ $<
233b1628 1075
926b9823 1076mod-jfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1077 sh $(srcdir)/genmodsrc.sh 'jfs' $< > $@ || (rm -f $@; exit 1)
1078
83709125 1079ifneq ($(jfs_mod_EXPORTS),no)
233b1628 1080def-jfs.lst: pre-jfs.o
1081 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 jfs/' > $@
83709125 1082endif
233b1628 1083
1084und-jfs.lst: pre-jfs.o
1085 echo 'jfs' > $@
1086 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1087
7d31f41f 1088jfs_mod-fs_jfs.o: fs/jfs.c $(fs/jfs.c_DEPENDENCIES)
46e5e5cb 1089 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jfs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1090-include jfs_mod-fs_jfs.d
1091
228ffeab 1092CLEANFILES += cmd-jfs_mod-fs_jfs.lst fs-jfs_mod-fs_jfs.lst partmap-jfs_mod-fs_jfs.lst
233b1628 1093COMMANDFILES += cmd-jfs_mod-fs_jfs.lst
1094FSFILES += fs-jfs_mod-fs_jfs.lst
228ffeab 1095PARTMAPFILES += partmap-jfs_mod-fs_jfs.lst
233b1628 1096
7d31f41f 1097cmd-jfs_mod-fs_jfs.lst: fs/jfs.c $(fs/jfs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1098 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh jfs > $@ || (rm -f $@; exit 1)
233b1628 1099
7d31f41f 1100fs-jfs_mod-fs_jfs.lst: fs/jfs.c $(fs/jfs.c_DEPENDENCIES) genfslist.sh
26c607b9 1101 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh jfs > $@ || (rm -f $@; exit 1)
233b1628 1102
228ffeab 1103partmap-jfs_mod-fs_jfs.lst: fs/jfs.c $(fs/jfs.c_DEPENDENCIES) genpartmaplist.sh
1104 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh jfs > $@ || (rm -f $@; exit 1)
1105
233b1628 1106
1107jfs_mod_CFLAGS = $(COMMON_CFLAGS)
1108jfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1109
1110# For iso9660.mod.
1111iso9660_mod_SOURCES = fs/iso9660.c
83709125 1112CLEANFILES += iso9660.mod mod-iso9660.o mod-iso9660.c pre-iso9660.o iso9660_mod-fs_iso9660.o und-iso9660.lst
1113ifneq ($(iso9660_mod_EXPORTS),no)
1114CLEANFILES += def-iso9660.lst
233b1628 1115DEFSYMFILES += def-iso9660.lst
83709125 1116endif
1117MOSTLYCLEANFILES += iso9660_mod-fs_iso9660.d
233b1628 1118UNDSYMFILES += und-iso9660.lst
1119
2a8a80e4 1120iso9660.mod: pre-iso9660.o mod-iso9660.o $(TARGET_OBJ2ELF)
233b1628 1121 -rm -f $@
2a8a80e4 1122 $(TARGET_CC) $(iso9660_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-iso9660.o mod-iso9660.o
1123 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1124 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1125
e02ac02c 1126pre-iso9660.o: $(iso9660_mod_DEPENDENCIES) iso9660_mod-fs_iso9660.o
233b1628 1127 -rm -f $@
e02ac02c 1128 $(TARGET_CC) $(iso9660_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ iso9660_mod-fs_iso9660.o
233b1628 1129
1130mod-iso9660.o: mod-iso9660.c
b977bf01 1131 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(iso9660_mod_CFLAGS) -c -o $@ $<
233b1628 1132
926b9823 1133mod-iso9660.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1134 sh $(srcdir)/genmodsrc.sh 'iso9660' $< > $@ || (rm -f $@; exit 1)
1135
83709125 1136ifneq ($(iso9660_mod_EXPORTS),no)
233b1628 1137def-iso9660.lst: pre-iso9660.o
1138 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 iso9660/' > $@
83709125 1139endif
233b1628 1140
1141und-iso9660.lst: pre-iso9660.o
1142 echo 'iso9660' > $@
1143 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1144
7d31f41f 1145iso9660_mod-fs_iso9660.o: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES)
46e5e5cb 1146 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(iso9660_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1147-include iso9660_mod-fs_iso9660.d
1148
228ffeab 1149CLEANFILES += cmd-iso9660_mod-fs_iso9660.lst fs-iso9660_mod-fs_iso9660.lst partmap-iso9660_mod-fs_iso9660.lst
233b1628 1150COMMANDFILES += cmd-iso9660_mod-fs_iso9660.lst
1151FSFILES += fs-iso9660_mod-fs_iso9660.lst
228ffeab 1152PARTMAPFILES += partmap-iso9660_mod-fs_iso9660.lst
233b1628 1153
7d31f41f 1154cmd-iso9660_mod-fs_iso9660.lst: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1155 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(iso9660_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh iso9660 > $@ || (rm -f $@; exit 1)
233b1628 1156
7d31f41f 1157fs-iso9660_mod-fs_iso9660.lst: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES) genfslist.sh
26c607b9 1158 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(iso9660_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh iso9660 > $@ || (rm -f $@; exit 1)
233b1628 1159
228ffeab 1160partmap-iso9660_mod-fs_iso9660.lst: fs/iso9660.c $(fs/iso9660.c_DEPENDENCIES) genpartmaplist.sh
1161 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(iso9660_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh iso9660 > $@ || (rm -f $@; exit 1)
1162
233b1628 1163
1164iso9660_mod_CFLAGS = $(COMMON_CFLAGS)
1165iso9660_mod_LDFLAGS = $(COMMON_LDFLAGS)
1166
1167# For xfs.mod.
1168xfs_mod_SOURCES = fs/xfs.c
83709125 1169CLEANFILES += xfs.mod mod-xfs.o mod-xfs.c pre-xfs.o xfs_mod-fs_xfs.o und-xfs.lst
1170ifneq ($(xfs_mod_EXPORTS),no)
1171CLEANFILES += def-xfs.lst
233b1628 1172DEFSYMFILES += def-xfs.lst
83709125 1173endif
1174MOSTLYCLEANFILES += xfs_mod-fs_xfs.d
233b1628 1175UNDSYMFILES += und-xfs.lst
1176
2a8a80e4 1177xfs.mod: pre-xfs.o mod-xfs.o $(TARGET_OBJ2ELF)
233b1628 1178 -rm -f $@
2a8a80e4 1179 $(TARGET_CC) $(xfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-xfs.o mod-xfs.o
1180 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1181 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1182
e02ac02c 1183pre-xfs.o: $(xfs_mod_DEPENDENCIES) xfs_mod-fs_xfs.o
233b1628 1184 -rm -f $@
e02ac02c 1185 $(TARGET_CC) $(xfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ xfs_mod-fs_xfs.o
233b1628 1186
1187mod-xfs.o: mod-xfs.c
b977bf01 1188 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(xfs_mod_CFLAGS) -c -o $@ $<
233b1628 1189
926b9823 1190mod-xfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1191 sh $(srcdir)/genmodsrc.sh 'xfs' $< > $@ || (rm -f $@; exit 1)
1192
83709125 1193ifneq ($(xfs_mod_EXPORTS),no)
233b1628 1194def-xfs.lst: pre-xfs.o
1195 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 xfs/' > $@
83709125 1196endif
233b1628 1197
1198und-xfs.lst: pre-xfs.o
1199 echo 'xfs' > $@
1200 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1201
7d31f41f 1202xfs_mod-fs_xfs.o: fs/xfs.c $(fs/xfs.c_DEPENDENCIES)
46e5e5cb 1203 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(xfs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1204-include xfs_mod-fs_xfs.d
1205
228ffeab 1206CLEANFILES += cmd-xfs_mod-fs_xfs.lst fs-xfs_mod-fs_xfs.lst partmap-xfs_mod-fs_xfs.lst
233b1628 1207COMMANDFILES += cmd-xfs_mod-fs_xfs.lst
1208FSFILES += fs-xfs_mod-fs_xfs.lst
228ffeab 1209PARTMAPFILES += partmap-xfs_mod-fs_xfs.lst
233b1628 1210
7d31f41f 1211cmd-xfs_mod-fs_xfs.lst: fs/xfs.c $(fs/xfs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1212 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(xfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh xfs > $@ || (rm -f $@; exit 1)
233b1628 1213
7d31f41f 1214fs-xfs_mod-fs_xfs.lst: fs/xfs.c $(fs/xfs.c_DEPENDENCIES) genfslist.sh
26c607b9 1215 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(xfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh xfs > $@ || (rm -f $@; exit 1)
233b1628 1216
228ffeab 1217partmap-xfs_mod-fs_xfs.lst: fs/xfs.c $(fs/xfs.c_DEPENDENCIES) genpartmaplist.sh
1218 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(xfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh xfs > $@ || (rm -f $@; exit 1)
1219
233b1628 1220
1221xfs_mod_CFLAGS = $(COMMON_CFLAGS)
1222xfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1223
1224# For affs.mod.
1225affs_mod_SOURCES = fs/affs.c
83709125 1226CLEANFILES += affs.mod mod-affs.o mod-affs.c pre-affs.o affs_mod-fs_affs.o und-affs.lst
1227ifneq ($(affs_mod_EXPORTS),no)
1228CLEANFILES += def-affs.lst
233b1628 1229DEFSYMFILES += def-affs.lst
83709125 1230endif
1231MOSTLYCLEANFILES += affs_mod-fs_affs.d
233b1628 1232UNDSYMFILES += und-affs.lst
1233
2a8a80e4 1234affs.mod: pre-affs.o mod-affs.o $(TARGET_OBJ2ELF)
233b1628 1235 -rm -f $@
2a8a80e4 1236 $(TARGET_CC) $(affs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-affs.o mod-affs.o
1237 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1238 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1239
e02ac02c 1240pre-affs.o: $(affs_mod_DEPENDENCIES) affs_mod-fs_affs.o
233b1628 1241 -rm -f $@
e02ac02c 1242 $(TARGET_CC) $(affs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ affs_mod-fs_affs.o
233b1628 1243
1244mod-affs.o: mod-affs.c
b977bf01 1245 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(affs_mod_CFLAGS) -c -o $@ $<
233b1628 1246
926b9823 1247mod-affs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1248 sh $(srcdir)/genmodsrc.sh 'affs' $< > $@ || (rm -f $@; exit 1)
1249
83709125 1250ifneq ($(affs_mod_EXPORTS),no)
233b1628 1251def-affs.lst: pre-affs.o
1252 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 affs/' > $@
83709125 1253endif
233b1628 1254
1255und-affs.lst: pre-affs.o
1256 echo 'affs' > $@
1257 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1258
7d31f41f 1259affs_mod-fs_affs.o: fs/affs.c $(fs/affs.c_DEPENDENCIES)
46e5e5cb 1260 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(affs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1261-include affs_mod-fs_affs.d
1262
228ffeab 1263CLEANFILES += cmd-affs_mod-fs_affs.lst fs-affs_mod-fs_affs.lst partmap-affs_mod-fs_affs.lst
233b1628 1264COMMANDFILES += cmd-affs_mod-fs_affs.lst
1265FSFILES += fs-affs_mod-fs_affs.lst
228ffeab 1266PARTMAPFILES += partmap-affs_mod-fs_affs.lst
233b1628 1267
7d31f41f 1268cmd-affs_mod-fs_affs.lst: fs/affs.c $(fs/affs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1269 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(affs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh affs > $@ || (rm -f $@; exit 1)
233b1628 1270
7d31f41f 1271fs-affs_mod-fs_affs.lst: fs/affs.c $(fs/affs.c_DEPENDENCIES) genfslist.sh
26c607b9 1272 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(affs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh affs > $@ || (rm -f $@; exit 1)
233b1628 1273
228ffeab 1274partmap-affs_mod-fs_affs.lst: fs/affs.c $(fs/affs.c_DEPENDENCIES) genpartmaplist.sh
1275 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(affs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh affs > $@ || (rm -f $@; exit 1)
1276
233b1628 1277
1278affs_mod_CFLAGS = $(COMMON_CFLAGS)
1279affs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1280
1281# For sfs.mod.
1282sfs_mod_SOURCES = fs/sfs.c
83709125 1283CLEANFILES += sfs.mod mod-sfs.o mod-sfs.c pre-sfs.o sfs_mod-fs_sfs.o und-sfs.lst
1284ifneq ($(sfs_mod_EXPORTS),no)
1285CLEANFILES += def-sfs.lst
233b1628 1286DEFSYMFILES += def-sfs.lst
83709125 1287endif
1288MOSTLYCLEANFILES += sfs_mod-fs_sfs.d
233b1628 1289UNDSYMFILES += und-sfs.lst
1290
2a8a80e4 1291sfs.mod: pre-sfs.o mod-sfs.o $(TARGET_OBJ2ELF)
233b1628 1292 -rm -f $@
2a8a80e4 1293 $(TARGET_CC) $(sfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-sfs.o mod-sfs.o
1294 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1295 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1296
e02ac02c 1297pre-sfs.o: $(sfs_mod_DEPENDENCIES) sfs_mod-fs_sfs.o
233b1628 1298 -rm -f $@
e02ac02c 1299 $(TARGET_CC) $(sfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ sfs_mod-fs_sfs.o
233b1628 1300
1301mod-sfs.o: mod-sfs.c
b977bf01 1302 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sfs_mod_CFLAGS) -c -o $@ $<
233b1628 1303
926b9823 1304mod-sfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1305 sh $(srcdir)/genmodsrc.sh 'sfs' $< > $@ || (rm -f $@; exit 1)
1306
83709125 1307ifneq ($(sfs_mod_EXPORTS),no)
233b1628 1308def-sfs.lst: pre-sfs.o
1309 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 sfs/' > $@
83709125 1310endif
233b1628 1311
1312und-sfs.lst: pre-sfs.o
1313 echo 'sfs' > $@
1314 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1315
7d31f41f 1316sfs_mod-fs_sfs.o: fs/sfs.c $(fs/sfs.c_DEPENDENCIES)
46e5e5cb 1317 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sfs_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1318-include sfs_mod-fs_sfs.d
1319
228ffeab 1320CLEANFILES += cmd-sfs_mod-fs_sfs.lst fs-sfs_mod-fs_sfs.lst partmap-sfs_mod-fs_sfs.lst
233b1628 1321COMMANDFILES += cmd-sfs_mod-fs_sfs.lst
1322FSFILES += fs-sfs_mod-fs_sfs.lst
228ffeab 1323PARTMAPFILES += partmap-sfs_mod-fs_sfs.lst
233b1628 1324
7d31f41f 1325cmd-sfs_mod-fs_sfs.lst: fs/sfs.c $(fs/sfs.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1326 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh sfs > $@ || (rm -f $@; exit 1)
233b1628 1327
7d31f41f 1328fs-sfs_mod-fs_sfs.lst: fs/sfs.c $(fs/sfs.c_DEPENDENCIES) genfslist.sh
26c607b9 1329 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh sfs > $@ || (rm -f $@; exit 1)
233b1628 1330
228ffeab 1331partmap-sfs_mod-fs_sfs.lst: fs/sfs.c $(fs/sfs.c_DEPENDENCIES) genpartmaplist.sh
1332 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh sfs > $@ || (rm -f $@; exit 1)
1333
233b1628 1334
1335sfs_mod_CFLAGS = $(COMMON_CFLAGS)
1336sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
233b1628 1337
50214199 1338# For hfsplus.mod.
1339hfsplus_mod_SOURCES = fs/hfsplus.c
83709125 1340CLEANFILES += hfsplus.mod mod-hfsplus.o mod-hfsplus.c pre-hfsplus.o hfsplus_mod-fs_hfsplus.o und-hfsplus.lst
1341ifneq ($(hfsplus_mod_EXPORTS),no)
1342CLEANFILES += def-hfsplus.lst
50214199 1343DEFSYMFILES += def-hfsplus.lst
83709125 1344endif
1345MOSTLYCLEANFILES += hfsplus_mod-fs_hfsplus.d
50214199 1346UNDSYMFILES += und-hfsplus.lst
1347
2a8a80e4 1348hfsplus.mod: pre-hfsplus.o mod-hfsplus.o $(TARGET_OBJ2ELF)
50214199 1349 -rm -f $@
2a8a80e4 1350 $(TARGET_CC) $(hfsplus_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-hfsplus.o mod-hfsplus.o
1351 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1352 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
50214199 1353
e02ac02c 1354pre-hfsplus.o: $(hfsplus_mod_DEPENDENCIES) hfsplus_mod-fs_hfsplus.o
50214199 1355 -rm -f $@
e02ac02c 1356 $(TARGET_CC) $(hfsplus_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hfsplus_mod-fs_hfsplus.o
50214199 1357
1358mod-hfsplus.o: mod-hfsplus.c
b977bf01 1359 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfsplus_mod_CFLAGS) -c -o $@ $<
50214199 1360
926b9823 1361mod-hfsplus.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
50214199 1362 sh $(srcdir)/genmodsrc.sh 'hfsplus' $< > $@ || (rm -f $@; exit 1)
1363
83709125 1364ifneq ($(hfsplus_mod_EXPORTS),no)
50214199 1365def-hfsplus.lst: pre-hfsplus.o
1366 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hfsplus/' > $@
83709125 1367endif
50214199 1368
1369und-hfsplus.lst: pre-hfsplus.o
1370 echo 'hfsplus' > $@
1371 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1372
7d31f41f 1373hfsplus_mod-fs_hfsplus.o: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES)
46e5e5cb 1374 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfsplus_mod_CFLAGS) -MD -c -o $@ $<
50214199 1375-include hfsplus_mod-fs_hfsplus.d
1376
228ffeab 1377CLEANFILES += cmd-hfsplus_mod-fs_hfsplus.lst fs-hfsplus_mod-fs_hfsplus.lst partmap-hfsplus_mod-fs_hfsplus.lst
50214199 1378COMMANDFILES += cmd-hfsplus_mod-fs_hfsplus.lst
1379FSFILES += fs-hfsplus_mod-fs_hfsplus.lst
228ffeab 1380PARTMAPFILES += partmap-hfsplus_mod-fs_hfsplus.lst
50214199 1381
7d31f41f 1382cmd-hfsplus_mod-fs_hfsplus.lst: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1383 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfsplus_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh hfsplus > $@ || (rm -f $@; exit 1)
50214199 1384
7d31f41f 1385fs-hfsplus_mod-fs_hfsplus.lst: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES) genfslist.sh
26c607b9 1386 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfsplus_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh hfsplus > $@ || (rm -f $@; exit 1)
50214199 1387
228ffeab 1388partmap-hfsplus_mod-fs_hfsplus.lst: fs/hfsplus.c $(fs/hfsplus.c_DEPENDENCIES) genpartmaplist.sh
1389 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hfsplus_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh hfsplus > $@ || (rm -f $@; exit 1)
1390
50214199 1391
1392hfsplus_mod_CFLAGS = $(COMMON_CFLAGS)
1393hfsplus_mod_LDFLAGS = $(COMMON_LDFLAGS)
1394
492e6d9d 1395# For reiserfs.mod.
1396reiserfs_mod_SOURCES = fs/reiserfs.c
1397CLEANFILES += reiserfs.mod mod-reiserfs.o mod-reiserfs.c pre-reiserfs.o reiserfs_mod-fs_reiserfs.o und-reiserfs.lst
1398ifneq ($(reiserfs_mod_EXPORTS),no)
1399CLEANFILES += def-reiserfs.lst
1400DEFSYMFILES += def-reiserfs.lst
1401endif
1402MOSTLYCLEANFILES += reiserfs_mod-fs_reiserfs.d
1403UNDSYMFILES += und-reiserfs.lst
1404
2a8a80e4 1405reiserfs.mod: pre-reiserfs.o mod-reiserfs.o $(TARGET_OBJ2ELF)
492e6d9d 1406 -rm -f $@
2a8a80e4 1407 $(TARGET_CC) $(reiserfs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-reiserfs.o mod-reiserfs.o
1408 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1409 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
492e6d9d 1410
1411pre-reiserfs.o: $(reiserfs_mod_DEPENDENCIES) reiserfs_mod-fs_reiserfs.o
1412 -rm -f $@
1413 $(TARGET_CC) $(reiserfs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ reiserfs_mod-fs_reiserfs.o
1414
1415mod-reiserfs.o: mod-reiserfs.c
1416 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reiserfs_mod_CFLAGS) -c -o $@ $<
1417
926b9823 1418mod-reiserfs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
492e6d9d 1419 sh $(srcdir)/genmodsrc.sh 'reiserfs' $< > $@ || (rm -f $@; exit 1)
1420
1421ifneq ($(reiserfs_mod_EXPORTS),no)
1422def-reiserfs.lst: pre-reiserfs.o
1423 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 reiserfs/' > $@
1424endif
1425
1426und-reiserfs.lst: pre-reiserfs.o
1427 echo 'reiserfs' > $@
1428 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1429
7d31f41f 1430reiserfs_mod-fs_reiserfs.o: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES)
492e6d9d 1431 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reiserfs_mod_CFLAGS) -MD -c -o $@ $<
1432-include reiserfs_mod-fs_reiserfs.d
1433
228ffeab 1434CLEANFILES += cmd-reiserfs_mod-fs_reiserfs.lst fs-reiserfs_mod-fs_reiserfs.lst partmap-reiserfs_mod-fs_reiserfs.lst
492e6d9d 1435COMMANDFILES += cmd-reiserfs_mod-fs_reiserfs.lst
1436FSFILES += fs-reiserfs_mod-fs_reiserfs.lst
228ffeab 1437PARTMAPFILES += partmap-reiserfs_mod-fs_reiserfs.lst
492e6d9d 1438
7d31f41f 1439cmd-reiserfs_mod-fs_reiserfs.lst: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES) gencmdlist.sh
492e6d9d 1440 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reiserfs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh reiserfs > $@ || (rm -f $@; exit 1)
1441
7d31f41f 1442fs-reiserfs_mod-fs_reiserfs.lst: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES) genfslist.sh
492e6d9d 1443 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reiserfs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh reiserfs > $@ || (rm -f $@; exit 1)
1444
228ffeab 1445partmap-reiserfs_mod-fs_reiserfs.lst: fs/reiserfs.c $(fs/reiserfs.c_DEPENDENCIES) genpartmaplist.sh
1446 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reiserfs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh reiserfs > $@ || (rm -f $@; exit 1)
1447
492e6d9d 1448
1449reiserfs_mod_CFLAGS = $(COMMON_CFLAGS)
1450reiserfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1451
fc6e896c 1452# For cpio.mod.
1453cpio_mod_SOURCES = fs/cpio.c
1454CLEANFILES += cpio.mod mod-cpio.o mod-cpio.c pre-cpio.o cpio_mod-fs_cpio.o und-cpio.lst
1455ifneq ($(cpio_mod_EXPORTS),no)
1456CLEANFILES += def-cpio.lst
1457DEFSYMFILES += def-cpio.lst
1458endif
1459MOSTLYCLEANFILES += cpio_mod-fs_cpio.d
1460UNDSYMFILES += und-cpio.lst
1461
2a8a80e4 1462cpio.mod: pre-cpio.o mod-cpio.o $(TARGET_OBJ2ELF)
fc6e896c 1463 -rm -f $@
2a8a80e4 1464 $(TARGET_CC) $(cpio_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-cpio.o mod-cpio.o
1465 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1466 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
fc6e896c 1467
1468pre-cpio.o: $(cpio_mod_DEPENDENCIES) cpio_mod-fs_cpio.o
1469 -rm -f $@
1470 $(TARGET_CC) $(cpio_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ cpio_mod-fs_cpio.o
1471
1472mod-cpio.o: mod-cpio.c
1473 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpio_mod_CFLAGS) -c -o $@ $<
1474
926b9823 1475mod-cpio.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
fc6e896c 1476 sh $(srcdir)/genmodsrc.sh 'cpio' $< > $@ || (rm -f $@; exit 1)
1477
1478ifneq ($(cpio_mod_EXPORTS),no)
1479def-cpio.lst: pre-cpio.o
1480 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cpio/' > $@
1481endif
1482
1483und-cpio.lst: pre-cpio.o
1484 echo 'cpio' > $@
1485 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1486
7d31f41f 1487cpio_mod-fs_cpio.o: fs/cpio.c $(fs/cpio.c_DEPENDENCIES)
fc6e896c 1488 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpio_mod_CFLAGS) -MD -c -o $@ $<
1489-include cpio_mod-fs_cpio.d
1490
228ffeab 1491CLEANFILES += cmd-cpio_mod-fs_cpio.lst fs-cpio_mod-fs_cpio.lst partmap-cpio_mod-fs_cpio.lst
fc6e896c 1492COMMANDFILES += cmd-cpio_mod-fs_cpio.lst
1493FSFILES += fs-cpio_mod-fs_cpio.lst
228ffeab 1494PARTMAPFILES += partmap-cpio_mod-fs_cpio.lst
fc6e896c 1495
7d31f41f 1496cmd-cpio_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) gencmdlist.sh
fc6e896c 1497 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpio_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh cpio > $@ || (rm -f $@; exit 1)
1498
7d31f41f 1499fs-cpio_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) genfslist.sh
fc6e896c 1500 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpio_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh cpio > $@ || (rm -f $@; exit 1)
1501
228ffeab 1502partmap-cpio_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) genpartmaplist.sh
1503 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpio_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh cpio > $@ || (rm -f $@; exit 1)
1504
fc6e896c 1505
1506cpio_mod_CFLAGS = $(COMMON_CFLAGS)
1507cpio_mod_LDFLAGS = $(COMMON_LDFLAGS)
1508
f821ce59 1509# For tar.mod.
1510tar_mod_SOURCES = fs/cpio.c
1511CLEANFILES += tar.mod mod-tar.o mod-tar.c pre-tar.o tar_mod-fs_cpio.o und-tar.lst
1512ifneq ($(tar_mod_EXPORTS),no)
1513CLEANFILES += def-tar.lst
1514DEFSYMFILES += def-tar.lst
1515endif
1516MOSTLYCLEANFILES += tar_mod-fs_cpio.d
1517UNDSYMFILES += und-tar.lst
1518
1519tar.mod: pre-tar.o mod-tar.o $(TARGET_OBJ2ELF)
1520 -rm -f $@
1521 $(TARGET_CC) $(tar_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-tar.o mod-tar.o
1522 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1523 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
1524
1525pre-tar.o: $(tar_mod_DEPENDENCIES) tar_mod-fs_cpio.o
1526 -rm -f $@
1527 $(TARGET_CC) $(tar_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ tar_mod-fs_cpio.o
1528
1529mod-tar.o: mod-tar.c
1530 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tar_mod_CFLAGS) -c -o $@ $<
1531
1532mod-tar.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
1533 sh $(srcdir)/genmodsrc.sh 'tar' $< > $@ || (rm -f $@; exit 1)
1534
1535ifneq ($(tar_mod_EXPORTS),no)
1536def-tar.lst: pre-tar.o
1537 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 tar/' > $@
1538endif
1539
1540und-tar.lst: pre-tar.o
1541 echo 'tar' > $@
1542 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1543
1544tar_mod-fs_cpio.o: fs/cpio.c $(fs/cpio.c_DEPENDENCIES)
1545 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tar_mod_CFLAGS) -MD -c -o $@ $<
1546-include tar_mod-fs_cpio.d
1547
1548CLEANFILES += cmd-tar_mod-fs_cpio.lst fs-tar_mod-fs_cpio.lst partmap-tar_mod-fs_cpio.lst
1549COMMANDFILES += cmd-tar_mod-fs_cpio.lst
1550FSFILES += fs-tar_mod-fs_cpio.lst
1551PARTMAPFILES += partmap-tar_mod-fs_cpio.lst
1552
1553cmd-tar_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) gencmdlist.sh
1554 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tar_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh tar > $@ || (rm -f $@; exit 1)
1555
1556fs-tar_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) genfslist.sh
1557 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tar_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh tar > $@ || (rm -f $@; exit 1)
1558
1559partmap-tar_mod-fs_cpio.lst: fs/cpio.c $(fs/cpio.c_DEPENDENCIES) genpartmaplist.sh
1560 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tar_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh tar > $@ || (rm -f $@; exit 1)
1561
1562
1563tar_mod_CFLAGS = $(COMMON_CFLAGS) -DMODE_USTAR
1564tar_mod_LDFLAGS = $(COMMON_LDFLAGS)
1565
0d16e571 1566# For udf.mod.
1567udf_mod_SOURCES = fs/udf.c
1568CLEANFILES += udf.mod mod-udf.o mod-udf.c pre-udf.o udf_mod-fs_udf.o und-udf.lst
1569ifneq ($(udf_mod_EXPORTS),no)
1570CLEANFILES += def-udf.lst
1571DEFSYMFILES += def-udf.lst
1572endif
1573MOSTLYCLEANFILES += udf_mod-fs_udf.d
1574UNDSYMFILES += und-udf.lst
1575
2a8a80e4 1576udf.mod: pre-udf.o mod-udf.o $(TARGET_OBJ2ELF)
0d16e571 1577 -rm -f $@
2a8a80e4 1578 $(TARGET_CC) $(udf_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-udf.o mod-udf.o
1579 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1580 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
0d16e571 1581
1582pre-udf.o: $(udf_mod_DEPENDENCIES) udf_mod-fs_udf.o
1583 -rm -f $@
1584 $(TARGET_CC) $(udf_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ udf_mod-fs_udf.o
1585
1586mod-udf.o: mod-udf.c
1587 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(udf_mod_CFLAGS) -c -o $@ $<
1588
926b9823 1589mod-udf.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
0d16e571 1590 sh $(srcdir)/genmodsrc.sh 'udf' $< > $@ || (rm -f $@; exit 1)
1591
1592ifneq ($(udf_mod_EXPORTS),no)
1593def-udf.lst: pre-udf.o
1594 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 udf/' > $@
1595endif
1596
1597und-udf.lst: pre-udf.o
1598 echo 'udf' > $@
1599 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1600
1601udf_mod-fs_udf.o: fs/udf.c $(fs/udf.c_DEPENDENCIES)
1602 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(udf_mod_CFLAGS) -MD -c -o $@ $<
1603-include udf_mod-fs_udf.d
1604
228ffeab 1605CLEANFILES += cmd-udf_mod-fs_udf.lst fs-udf_mod-fs_udf.lst partmap-udf_mod-fs_udf.lst
0d16e571 1606COMMANDFILES += cmd-udf_mod-fs_udf.lst
1607FSFILES += fs-udf_mod-fs_udf.lst
228ffeab 1608PARTMAPFILES += partmap-udf_mod-fs_udf.lst
0d16e571 1609
1610cmd-udf_mod-fs_udf.lst: fs/udf.c $(fs/udf.c_DEPENDENCIES) gencmdlist.sh
1611 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(udf_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh udf > $@ || (rm -f $@; exit 1)
1612
1613fs-udf_mod-fs_udf.lst: fs/udf.c $(fs/udf.c_DEPENDENCIES) genfslist.sh
1614 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(udf_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh udf > $@ || (rm -f $@; exit 1)
1615
228ffeab 1616partmap-udf_mod-fs_udf.lst: fs/udf.c $(fs/udf.c_DEPENDENCIES) genpartmaplist.sh
1617 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(udf_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh udf > $@ || (rm -f $@; exit 1)
1618
0d16e571 1619
1620udf_mod_CFLAGS = $(COMMON_CFLAGS)
1621udf_mod_LDFLAGS = $(COMMON_LDFLAGS)
1622
86cb4f54 1623# For afs.mod.
1624afs_mod_SOURCES = fs/afs.c
1625CLEANFILES += afs.mod mod-afs.o mod-afs.c pre-afs.o afs_mod-fs_afs.o und-afs.lst
1626ifneq ($(afs_mod_EXPORTS),no)
1627CLEANFILES += def-afs.lst
1628DEFSYMFILES += def-afs.lst
1629endif
1630MOSTLYCLEANFILES += afs_mod-fs_afs.d
1631UNDSYMFILES += und-afs.lst
1632
2a8a80e4 1633afs.mod: pre-afs.o mod-afs.o $(TARGET_OBJ2ELF)
86cb4f54 1634 -rm -f $@
2a8a80e4 1635 $(TARGET_CC) $(afs_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-afs.o mod-afs.o
1636 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1637 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
86cb4f54 1638
1639pre-afs.o: $(afs_mod_DEPENDENCIES) afs_mod-fs_afs.o
1640 -rm -f $@
1641 $(TARGET_CC) $(afs_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ afs_mod-fs_afs.o
1642
1643mod-afs.o: mod-afs.c
1644 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(afs_mod_CFLAGS) -c -o $@ $<
1645
926b9823 1646mod-afs.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
86cb4f54 1647 sh $(srcdir)/genmodsrc.sh 'afs' $< > $@ || (rm -f $@; exit 1)
1648
1649ifneq ($(afs_mod_EXPORTS),no)
1650def-afs.lst: pre-afs.o
1651 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 afs/' > $@
1652endif
1653
1654und-afs.lst: pre-afs.o
1655 echo 'afs' > $@
1656 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1657
1658afs_mod-fs_afs.o: fs/afs.c $(fs/afs.c_DEPENDENCIES)
1659 $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(afs_mod_CFLAGS) -MD -c -o $@ $<
1660-include afs_mod-fs_afs.d
1661
228ffeab 1662CLEANFILES += cmd-afs_mod-fs_afs.lst fs-afs_mod-fs_afs.lst partmap-afs_mod-fs_afs.lst
86cb4f54 1663COMMANDFILES += cmd-afs_mod-fs_afs.lst
1664FSFILES += fs-afs_mod-fs_afs.lst
228ffeab 1665PARTMAPFILES += partmap-afs_mod-fs_afs.lst
86cb4f54 1666
1667cmd-afs_mod-fs_afs.lst: fs/afs.c $(fs/afs.c_DEPENDENCIES) gencmdlist.sh
1668 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(afs_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh afs > $@ || (rm -f $@; exit 1)
1669
1670fs-afs_mod-fs_afs.lst: fs/afs.c $(fs/afs.c_DEPENDENCIES) genfslist.sh
1671 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(afs_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh afs > $@ || (rm -f $@; exit 1)
1672
228ffeab 1673partmap-afs_mod-fs_afs.lst: fs/afs.c $(fs/afs.c_DEPENDENCIES) genpartmaplist.sh
1674 set -e; $(TARGET_CC) -Ifs -I$(srcdir)/fs $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(afs_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh afs > $@ || (rm -f $@; exit 1)
1675
86cb4f54 1676
1677afs_mod_CFLAGS = $(COMMON_CFLAGS)
1678afs_mod_LDFLAGS = $(COMMON_LDFLAGS)
1679
b04216ab 1680# Partition maps.
4931827f 1681pkglib_MODULES += amiga.mod apple.mod pc.mod sun.mod acorn.mod gpt.mod
233b1628 1682
1683# For amiga.mod
1684amiga_mod_SOURCES = partmap/amiga.c
83709125 1685CLEANFILES += amiga.mod mod-amiga.o mod-amiga.c pre-amiga.o amiga_mod-partmap_amiga.o und-amiga.lst
1686ifneq ($(amiga_mod_EXPORTS),no)
1687CLEANFILES += def-amiga.lst
233b1628 1688DEFSYMFILES += def-amiga.lst
83709125 1689endif
1690MOSTLYCLEANFILES += amiga_mod-partmap_amiga.d
233b1628 1691UNDSYMFILES += und-amiga.lst
1692
2a8a80e4 1693amiga.mod: pre-amiga.o mod-amiga.o $(TARGET_OBJ2ELF)
233b1628 1694 -rm -f $@
2a8a80e4 1695 $(TARGET_CC) $(amiga_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-amiga.o mod-amiga.o
1696 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1697 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1698
e02ac02c 1699pre-amiga.o: $(amiga_mod_DEPENDENCIES) amiga_mod-partmap_amiga.o
233b1628 1700 -rm -f $@
e02ac02c 1701 $(TARGET_CC) $(amiga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ amiga_mod-partmap_amiga.o
233b1628 1702
1703mod-amiga.o: mod-amiga.c
b977bf01 1704 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(amiga_mod_CFLAGS) -c -o $@ $<
233b1628 1705
926b9823 1706mod-amiga.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1707 sh $(srcdir)/genmodsrc.sh 'amiga' $< > $@ || (rm -f $@; exit 1)
1708
83709125 1709ifneq ($(amiga_mod_EXPORTS),no)
233b1628 1710def-amiga.lst: pre-amiga.o
1711 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 amiga/' > $@
83709125 1712endif
233b1628 1713
1714und-amiga.lst: pre-amiga.o
1715 echo 'amiga' > $@
1716 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1717
7d31f41f 1718amiga_mod-partmap_amiga.o: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES)
46e5e5cb 1719 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(amiga_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1720-include amiga_mod-partmap_amiga.d
1721
228ffeab 1722CLEANFILES += cmd-amiga_mod-partmap_amiga.lst fs-amiga_mod-partmap_amiga.lst partmap-amiga_mod-partmap_amiga.lst
233b1628 1723COMMANDFILES += cmd-amiga_mod-partmap_amiga.lst
1724FSFILES += fs-amiga_mod-partmap_amiga.lst
228ffeab 1725PARTMAPFILES += partmap-amiga_mod-partmap_amiga.lst
233b1628 1726
7d31f41f 1727cmd-amiga_mod-partmap_amiga.lst: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1728 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(amiga_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh amiga > $@ || (rm -f $@; exit 1)
233b1628 1729
7d31f41f 1730fs-amiga_mod-partmap_amiga.lst: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES) genfslist.sh
26c607b9 1731 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(amiga_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh amiga > $@ || (rm -f $@; exit 1)
233b1628 1732
228ffeab 1733partmap-amiga_mod-partmap_amiga.lst: partmap/amiga.c $(partmap/amiga.c_DEPENDENCIES) genpartmaplist.sh
1734 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(amiga_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh amiga > $@ || (rm -f $@; exit 1)
1735
233b1628 1736
1737amiga_mod_CFLAGS = $(COMMON_CFLAGS)
1738amiga_mod_LDFLAGS = $(COMMON_LDFLAGS)
1739
1740# For apple.mod
1741apple_mod_SOURCES = partmap/apple.c
83709125 1742CLEANFILES += apple.mod mod-apple.o mod-apple.c pre-apple.o apple_mod-partmap_apple.o und-apple.lst
1743ifneq ($(apple_mod_EXPORTS),no)
1744CLEANFILES += def-apple.lst
233b1628 1745DEFSYMFILES += def-apple.lst
83709125 1746endif
1747MOSTLYCLEANFILES += apple_mod-partmap_apple.d
233b1628 1748UNDSYMFILES += und-apple.lst
1749
2a8a80e4 1750apple.mod: pre-apple.o mod-apple.o $(TARGET_OBJ2ELF)
233b1628 1751 -rm -f $@
2a8a80e4 1752 $(TARGET_CC) $(apple_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-apple.o mod-apple.o
1753 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1754 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1755
e02ac02c 1756pre-apple.o: $(apple_mod_DEPENDENCIES) apple_mod-partmap_apple.o
233b1628 1757 -rm -f $@
e02ac02c 1758 $(TARGET_CC) $(apple_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ apple_mod-partmap_apple.o
233b1628 1759
1760mod-apple.o: mod-apple.c
b977bf01 1761 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(apple_mod_CFLAGS) -c -o $@ $<
233b1628 1762
926b9823 1763mod-apple.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1764 sh $(srcdir)/genmodsrc.sh 'apple' $< > $@ || (rm -f $@; exit 1)
1765
83709125 1766ifneq ($(apple_mod_EXPORTS),no)
233b1628 1767def-apple.lst: pre-apple.o
1768 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 apple/' > $@
83709125 1769endif
233b1628 1770
1771und-apple.lst: pre-apple.o
1772 echo 'apple' > $@
1773 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1774
7d31f41f 1775apple_mod-partmap_apple.o: partmap/apple.c $(partmap/apple.c_DEPENDENCIES)
46e5e5cb 1776 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(apple_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1777-include apple_mod-partmap_apple.d
1778
228ffeab 1779CLEANFILES += cmd-apple_mod-partmap_apple.lst fs-apple_mod-partmap_apple.lst partmap-apple_mod-partmap_apple.lst
233b1628 1780COMMANDFILES += cmd-apple_mod-partmap_apple.lst
1781FSFILES += fs-apple_mod-partmap_apple.lst
228ffeab 1782PARTMAPFILES += partmap-apple_mod-partmap_apple.lst
233b1628 1783
7d31f41f 1784cmd-apple_mod-partmap_apple.lst: partmap/apple.c $(partmap/apple.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1785 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(apple_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh apple > $@ || (rm -f $@; exit 1)
233b1628 1786
7d31f41f 1787fs-apple_mod-partmap_apple.lst: partmap/apple.c $(partmap/apple.c_DEPENDENCIES) genfslist.sh
26c607b9 1788 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(apple_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh apple > $@ || (rm -f $@; exit 1)
233b1628 1789
228ffeab 1790partmap-apple_mod-partmap_apple.lst: partmap/apple.c $(partmap/apple.c_DEPENDENCIES) genpartmaplist.sh
1791 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(apple_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh apple > $@ || (rm -f $@; exit 1)
1792
233b1628 1793
1794apple_mod_CFLAGS = $(COMMON_CFLAGS)
1795apple_mod_LDFLAGS = $(COMMON_LDFLAGS)
1796
1797# For pc.mod
1798pc_mod_SOURCES = partmap/pc.c
83709125 1799CLEANFILES += pc.mod mod-pc.o mod-pc.c pre-pc.o pc_mod-partmap_pc.o und-pc.lst
1800ifneq ($(pc_mod_EXPORTS),no)
1801CLEANFILES += def-pc.lst
233b1628 1802DEFSYMFILES += def-pc.lst
83709125 1803endif
1804MOSTLYCLEANFILES += pc_mod-partmap_pc.d
233b1628 1805UNDSYMFILES += und-pc.lst
1806
2a8a80e4 1807pc.mod: pre-pc.o mod-pc.o $(TARGET_OBJ2ELF)
233b1628 1808 -rm -f $@
2a8a80e4 1809 $(TARGET_CC) $(pc_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-pc.o mod-pc.o
1810 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1811 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1812
e02ac02c 1813pre-pc.o: $(pc_mod_DEPENDENCIES) pc_mod-partmap_pc.o
233b1628 1814 -rm -f $@
e02ac02c 1815 $(TARGET_CC) $(pc_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ pc_mod-partmap_pc.o
233b1628 1816
1817mod-pc.o: mod-pc.c
b977bf01 1818 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pc_mod_CFLAGS) -c -o $@ $<
233b1628 1819
926b9823 1820mod-pc.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1821 sh $(srcdir)/genmodsrc.sh 'pc' $< > $@ || (rm -f $@; exit 1)
1822
83709125 1823ifneq ($(pc_mod_EXPORTS),no)
233b1628 1824def-pc.lst: pre-pc.o
1825 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 pc/' > $@
83709125 1826endif
233b1628 1827
1828und-pc.lst: pre-pc.o
1829 echo 'pc' > $@
1830 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1831
7d31f41f 1832pc_mod-partmap_pc.o: partmap/pc.c $(partmap/pc.c_DEPENDENCIES)
46e5e5cb 1833 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pc_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1834-include pc_mod-partmap_pc.d
1835
228ffeab 1836CLEANFILES += cmd-pc_mod-partmap_pc.lst fs-pc_mod-partmap_pc.lst partmap-pc_mod-partmap_pc.lst
233b1628 1837COMMANDFILES += cmd-pc_mod-partmap_pc.lst
1838FSFILES += fs-pc_mod-partmap_pc.lst
228ffeab 1839PARTMAPFILES += partmap-pc_mod-partmap_pc.lst
233b1628 1840
7d31f41f 1841cmd-pc_mod-partmap_pc.lst: partmap/pc.c $(partmap/pc.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1842 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pc_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh pc > $@ || (rm -f $@; exit 1)
233b1628 1843
7d31f41f 1844fs-pc_mod-partmap_pc.lst: partmap/pc.c $(partmap/pc.c_DEPENDENCIES) genfslist.sh
26c607b9 1845 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pc_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh pc > $@ || (rm -f $@; exit 1)
233b1628 1846
228ffeab 1847partmap-pc_mod-partmap_pc.lst: partmap/pc.c $(partmap/pc.c_DEPENDENCIES) genpartmaplist.sh
1848 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pc_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh pc > $@ || (rm -f $@; exit 1)
1849
233b1628 1850
1851pc_mod_CFLAGS = $(COMMON_CFLAGS)
1852pc_mod_LDFLAGS = $(COMMON_LDFLAGS)
1853
1854# For sun.mod
1855sun_mod_SOURCES = partmap/sun.c
83709125 1856CLEANFILES += sun.mod mod-sun.o mod-sun.c pre-sun.o sun_mod-partmap_sun.o und-sun.lst
1857ifneq ($(sun_mod_EXPORTS),no)
1858CLEANFILES += def-sun.lst
233b1628 1859DEFSYMFILES += def-sun.lst
83709125 1860endif
1861MOSTLYCLEANFILES += sun_mod-partmap_sun.d
233b1628 1862UNDSYMFILES += und-sun.lst
1863
2a8a80e4 1864sun.mod: pre-sun.o mod-sun.o $(TARGET_OBJ2ELF)
233b1628 1865 -rm -f $@
2a8a80e4 1866 $(TARGET_CC) $(sun_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-sun.o mod-sun.o
1867 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1868 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1869
e02ac02c 1870pre-sun.o: $(sun_mod_DEPENDENCIES) sun_mod-partmap_sun.o
233b1628 1871 -rm -f $@
e02ac02c 1872 $(TARGET_CC) $(sun_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ sun_mod-partmap_sun.o
233b1628 1873
1874mod-sun.o: mod-sun.c
b977bf01 1875 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sun_mod_CFLAGS) -c -o $@ $<
233b1628 1876
926b9823 1877mod-sun.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1878 sh $(srcdir)/genmodsrc.sh 'sun' $< > $@ || (rm -f $@; exit 1)
1879
83709125 1880ifneq ($(sun_mod_EXPORTS),no)
233b1628 1881def-sun.lst: pre-sun.o
1882 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 sun/' > $@
83709125 1883endif
233b1628 1884
1885und-sun.lst: pre-sun.o
1886 echo 'sun' > $@
1887 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1888
7d31f41f 1889sun_mod-partmap_sun.o: partmap/sun.c $(partmap/sun.c_DEPENDENCIES)
46e5e5cb 1890 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sun_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1891-include sun_mod-partmap_sun.d
1892
228ffeab 1893CLEANFILES += cmd-sun_mod-partmap_sun.lst fs-sun_mod-partmap_sun.lst partmap-sun_mod-partmap_sun.lst
233b1628 1894COMMANDFILES += cmd-sun_mod-partmap_sun.lst
1895FSFILES += fs-sun_mod-partmap_sun.lst
228ffeab 1896PARTMAPFILES += partmap-sun_mod-partmap_sun.lst
233b1628 1897
7d31f41f 1898cmd-sun_mod-partmap_sun.lst: partmap/sun.c $(partmap/sun.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1899 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sun_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh sun > $@ || (rm -f $@; exit 1)
233b1628 1900
7d31f41f 1901fs-sun_mod-partmap_sun.lst: partmap/sun.c $(partmap/sun.c_DEPENDENCIES) genfslist.sh
26c607b9 1902 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sun_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh sun > $@ || (rm -f $@; exit 1)
233b1628 1903
228ffeab 1904partmap-sun_mod-partmap_sun.lst: partmap/sun.c $(partmap/sun.c_DEPENDENCIES) genpartmaplist.sh
1905 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sun_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh sun > $@ || (rm -f $@; exit 1)
1906
233b1628 1907
1908sun_mod_CFLAGS = $(COMMON_CFLAGS)
1909sun_mod_LDFLAGS = $(COMMON_LDFLAGS)
1910
1911# For acorn.mod
1912acorn_mod_SOURCES = partmap/acorn.c
83709125 1913CLEANFILES += acorn.mod mod-acorn.o mod-acorn.c pre-acorn.o acorn_mod-partmap_acorn.o und-acorn.lst
1914ifneq ($(acorn_mod_EXPORTS),no)
1915CLEANFILES += def-acorn.lst
233b1628 1916DEFSYMFILES += def-acorn.lst
83709125 1917endif
1918MOSTLYCLEANFILES += acorn_mod-partmap_acorn.d
233b1628 1919UNDSYMFILES += und-acorn.lst
1920
2a8a80e4 1921acorn.mod: pre-acorn.o mod-acorn.o $(TARGET_OBJ2ELF)
233b1628 1922 -rm -f $@
2a8a80e4 1923 $(TARGET_CC) $(acorn_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-acorn.o mod-acorn.o
1924 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1925 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 1926
e02ac02c 1927pre-acorn.o: $(acorn_mod_DEPENDENCIES) acorn_mod-partmap_acorn.o
233b1628 1928 -rm -f $@
e02ac02c 1929 $(TARGET_CC) $(acorn_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ acorn_mod-partmap_acorn.o
233b1628 1930
1931mod-acorn.o: mod-acorn.c
b977bf01 1932 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(acorn_mod_CFLAGS) -c -o $@ $<
233b1628 1933
926b9823 1934mod-acorn.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 1935 sh $(srcdir)/genmodsrc.sh 'acorn' $< > $@ || (rm -f $@; exit 1)
1936
83709125 1937ifneq ($(acorn_mod_EXPORTS),no)
233b1628 1938def-acorn.lst: pre-acorn.o
1939 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 acorn/' > $@
83709125 1940endif
233b1628 1941
1942und-acorn.lst: pre-acorn.o
1943 echo 'acorn' > $@
1944 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
1945
7d31f41f 1946acorn_mod-partmap_acorn.o: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES)
46e5e5cb 1947 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(acorn_mod_CFLAGS) -MD -c -o $@ $<
233b1628 1948-include acorn_mod-partmap_acorn.d
1949
228ffeab 1950CLEANFILES += cmd-acorn_mod-partmap_acorn.lst fs-acorn_mod-partmap_acorn.lst partmap-acorn_mod-partmap_acorn.lst
233b1628 1951COMMANDFILES += cmd-acorn_mod-partmap_acorn.lst
1952FSFILES += fs-acorn_mod-partmap_acorn.lst
228ffeab 1953PARTMAPFILES += partmap-acorn_mod-partmap_acorn.lst
233b1628 1954
7d31f41f 1955cmd-acorn_mod-partmap_acorn.lst: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES) gencmdlist.sh
26c607b9 1956 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(acorn_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh acorn > $@ || (rm -f $@; exit 1)
233b1628 1957
7d31f41f 1958fs-acorn_mod-partmap_acorn.lst: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES) genfslist.sh
26c607b9 1959 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(acorn_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh acorn > $@ || (rm -f $@; exit 1)
233b1628 1960
228ffeab 1961partmap-acorn_mod-partmap_acorn.lst: partmap/acorn.c $(partmap/acorn.c_DEPENDENCIES) genpartmaplist.sh
1962 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(acorn_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh acorn > $@ || (rm -f $@; exit 1)
1963
233b1628 1964
1965acorn_mod_CFLAGS = $(COMMON_CFLAGS)
1966acorn_mod_LDFLAGS = $(COMMON_LDFLAGS)
1967
b04216ab 1968# For gpt.mod
1969gpt_mod_SOURCES = partmap/gpt.c
83709125 1970CLEANFILES += gpt.mod mod-gpt.o mod-gpt.c pre-gpt.o gpt_mod-partmap_gpt.o und-gpt.lst
1971ifneq ($(gpt_mod_EXPORTS),no)
1972CLEANFILES += def-gpt.lst
b04216ab 1973DEFSYMFILES += def-gpt.lst
83709125 1974endif
1975MOSTLYCLEANFILES += gpt_mod-partmap_gpt.d
b04216ab 1976UNDSYMFILES += und-gpt.lst
1977
2a8a80e4 1978gpt.mod: pre-gpt.o mod-gpt.o $(TARGET_OBJ2ELF)
b04216ab 1979 -rm -f $@
2a8a80e4 1980 $(TARGET_CC) $(gpt_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-gpt.o mod-gpt.o
1981 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
1982 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
b04216ab 1983
e02ac02c 1984pre-gpt.o: $(gpt_mod_DEPENDENCIES) gpt_mod-partmap_gpt.o
b04216ab 1985 -rm -f $@
e02ac02c 1986 $(TARGET_CC) $(gpt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ gpt_mod-partmap_gpt.o
b04216ab 1987
1988mod-gpt.o: mod-gpt.c
b977bf01 1989 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gpt_mod_CFLAGS) -c -o $@ $<
b04216ab 1990
926b9823 1991mod-gpt.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
b04216ab 1992 sh $(srcdir)/genmodsrc.sh 'gpt' $< > $@ || (rm -f $@; exit 1)
1993
83709125 1994ifneq ($(gpt_mod_EXPORTS),no)
b04216ab 1995def-gpt.lst: pre-gpt.o
1996 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 gpt/' > $@
83709125 1997endif
b04216ab 1998
1999und-gpt.lst: pre-gpt.o
2000 echo 'gpt' > $@
2001 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2002
7d31f41f 2003gpt_mod-partmap_gpt.o: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES)
46e5e5cb 2004 $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gpt_mod_CFLAGS) -MD -c -o $@ $<
b04216ab 2005-include gpt_mod-partmap_gpt.d
2006
228ffeab 2007CLEANFILES += cmd-gpt_mod-partmap_gpt.lst fs-gpt_mod-partmap_gpt.lst partmap-gpt_mod-partmap_gpt.lst
b04216ab 2008COMMANDFILES += cmd-gpt_mod-partmap_gpt.lst
2009FSFILES += fs-gpt_mod-partmap_gpt.lst
228ffeab 2010PARTMAPFILES += partmap-gpt_mod-partmap_gpt.lst
b04216ab 2011
7d31f41f 2012cmd-gpt_mod-partmap_gpt.lst: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2013 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gpt_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh gpt > $@ || (rm -f $@; exit 1)
b04216ab 2014
7d31f41f 2015fs-gpt_mod-partmap_gpt.lst: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES) genfslist.sh
26c607b9 2016 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gpt_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh gpt > $@ || (rm -f $@; exit 1)
b04216ab 2017
228ffeab 2018partmap-gpt_mod-partmap_gpt.lst: partmap/gpt.c $(partmap/gpt.c_DEPENDENCIES) genpartmaplist.sh
2019 set -e; $(TARGET_CC) -Ipartmap -I$(srcdir)/partmap $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gpt_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh gpt > $@ || (rm -f $@; exit 1)
2020
b04216ab 2021
2022gpt_mod_CFLAGS = $(COMMON_CFLAGS)
2023gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
2024
965c75ca 2025# Special disk structures and generic drivers
2b002173 2026
5ed20adc 2027pkglib_MODULES += raid.mod raid5rec.mod raid6rec.mod mdraid.mod dm_nv.mod \
965c75ca 2028 lvm.mod scsi.mod
2b002173 2029
2030# For raid.mod
2031raid_mod_SOURCES = disk/raid.c
2032CLEANFILES += raid.mod mod-raid.o mod-raid.c pre-raid.o raid_mod-disk_raid.o und-raid.lst
2033ifneq ($(raid_mod_EXPORTS),no)
2034CLEANFILES += def-raid.lst
2035DEFSYMFILES += def-raid.lst
2036endif
2037MOSTLYCLEANFILES += raid_mod-disk_raid.d
2038UNDSYMFILES += und-raid.lst
2039
2a8a80e4 2040raid.mod: pre-raid.o mod-raid.o $(TARGET_OBJ2ELF)
2b002173 2041 -rm -f $@
2a8a80e4 2042 $(TARGET_CC) $(raid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-raid.o mod-raid.o
2043 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2044 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2b002173 2045
2046pre-raid.o: $(raid_mod_DEPENDENCIES) raid_mod-disk_raid.o
2047 -rm -f $@
2048 $(TARGET_CC) $(raid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ raid_mod-disk_raid.o
2049
2050mod-raid.o: mod-raid.c
2051 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid_mod_CFLAGS) -c -o $@ $<
2052
926b9823 2053mod-raid.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2b002173 2054 sh $(srcdir)/genmodsrc.sh 'raid' $< > $@ || (rm -f $@; exit 1)
2055
2056ifneq ($(raid_mod_EXPORTS),no)
2057def-raid.lst: pre-raid.o
2058 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 raid/' > $@
2059endif
2060
2061und-raid.lst: pre-raid.o
2062 echo 'raid' > $@
2063 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2064
7d31f41f 2065raid_mod-disk_raid.o: disk/raid.c $(disk/raid.c_DEPENDENCIES)
46e5e5cb 2066 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid_mod_CFLAGS) -MD -c -o $@ $<
2b002173 2067-include raid_mod-disk_raid.d
2068
228ffeab 2069CLEANFILES += cmd-raid_mod-disk_raid.lst fs-raid_mod-disk_raid.lst partmap-raid_mod-disk_raid.lst
2b002173 2070COMMANDFILES += cmd-raid_mod-disk_raid.lst
2071FSFILES += fs-raid_mod-disk_raid.lst
228ffeab 2072PARTMAPFILES += partmap-raid_mod-disk_raid.lst
2b002173 2073
7d31f41f 2074cmd-raid_mod-disk_raid.lst: disk/raid.c $(disk/raid.c_DEPENDENCIES) gencmdlist.sh
2b002173 2075 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh raid > $@ || (rm -f $@; exit 1)
2076
7d31f41f 2077fs-raid_mod-disk_raid.lst: disk/raid.c $(disk/raid.c_DEPENDENCIES) genfslist.sh
2b002173 2078 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh raid > $@ || (rm -f $@; exit 1)
2079
228ffeab 2080partmap-raid_mod-disk_raid.lst: disk/raid.c $(disk/raid.c_DEPENDENCIES) genpartmaplist.sh
2081 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh raid > $@ || (rm -f $@; exit 1)
2082
2b002173 2083
2084raid_mod_CFLAGS = $(COMMON_CFLAGS)
2085raid_mod_LDFLAGS = $(COMMON_LDFLAGS)
2086
5ed20adc 2087# For raid5rec.mod
2088raid5rec_mod_SOURCES = disk/raid5_recover.c
2089CLEANFILES += raid5rec.mod mod-raid5rec.o mod-raid5rec.c pre-raid5rec.o raid5rec_mod-disk_raid5_recover.o und-raid5rec.lst
2090ifneq ($(raid5rec_mod_EXPORTS),no)
2091CLEANFILES += def-raid5rec.lst
2092DEFSYMFILES += def-raid5rec.lst
2093endif
2094MOSTLYCLEANFILES += raid5rec_mod-disk_raid5_recover.d
2095UNDSYMFILES += und-raid5rec.lst
2096
2097raid5rec.mod: pre-raid5rec.o mod-raid5rec.o $(TARGET_OBJ2ELF)
2098 -rm -f $@
2099 $(TARGET_CC) $(raid5rec_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-raid5rec.o mod-raid5rec.o
2100 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2101 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2102
2103pre-raid5rec.o: $(raid5rec_mod_DEPENDENCIES) raid5rec_mod-disk_raid5_recover.o
2104 -rm -f $@
2105 $(TARGET_CC) $(raid5rec_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ raid5rec_mod-disk_raid5_recover.o
2106
2107mod-raid5rec.o: mod-raid5rec.c
2108 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid5rec_mod_CFLAGS) -c -o $@ $<
2109
926b9823 2110mod-raid5rec.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
5ed20adc 2111 sh $(srcdir)/genmodsrc.sh 'raid5rec' $< > $@ || (rm -f $@; exit 1)
2112
2113ifneq ($(raid5rec_mod_EXPORTS),no)
2114def-raid5rec.lst: pre-raid5rec.o
2115 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 raid5rec/' > $@
2116endif
2117
2118und-raid5rec.lst: pre-raid5rec.o
2119 echo 'raid5rec' > $@
2120 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2121
2122raid5rec_mod-disk_raid5_recover.o: disk/raid5_recover.c $(disk/raid5_recover.c_DEPENDENCIES)
2123 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid5rec_mod_CFLAGS) -MD -c -o $@ $<
2124-include raid5rec_mod-disk_raid5_recover.d
2125
2126CLEANFILES += cmd-raid5rec_mod-disk_raid5_recover.lst fs-raid5rec_mod-disk_raid5_recover.lst partmap-raid5rec_mod-disk_raid5_recover.lst
2127COMMANDFILES += cmd-raid5rec_mod-disk_raid5_recover.lst
2128FSFILES += fs-raid5rec_mod-disk_raid5_recover.lst
2129PARTMAPFILES += partmap-raid5rec_mod-disk_raid5_recover.lst
2130
2131cmd-raid5rec_mod-disk_raid5_recover.lst: disk/raid5_recover.c $(disk/raid5_recover.c_DEPENDENCIES) gencmdlist.sh
2132 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid5rec_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh raid5rec > $@ || (rm -f $@; exit 1)
2133
2134fs-raid5rec_mod-disk_raid5_recover.lst: disk/raid5_recover.c $(disk/raid5_recover.c_DEPENDENCIES) genfslist.sh
2135 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid5rec_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh raid5rec > $@ || (rm -f $@; exit 1)
2136
2137partmap-raid5rec_mod-disk_raid5_recover.lst: disk/raid5_recover.c $(disk/raid5_recover.c_DEPENDENCIES) genpartmaplist.sh
2138 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid5rec_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh raid5rec > $@ || (rm -f $@; exit 1)
2139
2140
2141raid5rec_mod_CFLAGS = $(COMMON_CFLAGS)
2142raid5rec_mod_LDFLAGS = $(COMMON_LDFLAGS)
2143
2144# For raid6rec.mod
2145raid6rec_mod_SOURCES = disk/raid6_recover.c
2146CLEANFILES += raid6rec.mod mod-raid6rec.o mod-raid6rec.c pre-raid6rec.o raid6rec_mod-disk_raid6_recover.o und-raid6rec.lst
2147ifneq ($(raid6rec_mod_EXPORTS),no)
2148CLEANFILES += def-raid6rec.lst
2149DEFSYMFILES += def-raid6rec.lst
2150endif
2151MOSTLYCLEANFILES += raid6rec_mod-disk_raid6_recover.d
2152UNDSYMFILES += und-raid6rec.lst
2153
2154raid6rec.mod: pre-raid6rec.o mod-raid6rec.o $(TARGET_OBJ2ELF)
2155 -rm -f $@
2156 $(TARGET_CC) $(raid6rec_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-raid6rec.o mod-raid6rec.o
2157 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2158 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2159
2160pre-raid6rec.o: $(raid6rec_mod_DEPENDENCIES) raid6rec_mod-disk_raid6_recover.o
2161 -rm -f $@
2162 $(TARGET_CC) $(raid6rec_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ raid6rec_mod-disk_raid6_recover.o
2163
2164mod-raid6rec.o: mod-raid6rec.c
2165 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid6rec_mod_CFLAGS) -c -o $@ $<
2166
926b9823 2167mod-raid6rec.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
5ed20adc 2168 sh $(srcdir)/genmodsrc.sh 'raid6rec' $< > $@ || (rm -f $@; exit 1)
2169
2170ifneq ($(raid6rec_mod_EXPORTS),no)
2171def-raid6rec.lst: pre-raid6rec.o
2172 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 raid6rec/' > $@
2173endif
2174
2175und-raid6rec.lst: pre-raid6rec.o
2176 echo 'raid6rec' > $@
2177 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2178
2179raid6rec_mod-disk_raid6_recover.o: disk/raid6_recover.c $(disk/raid6_recover.c_DEPENDENCIES)
2180 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid6rec_mod_CFLAGS) -MD -c -o $@ $<
2181-include raid6rec_mod-disk_raid6_recover.d
2182
2183CLEANFILES += cmd-raid6rec_mod-disk_raid6_recover.lst fs-raid6rec_mod-disk_raid6_recover.lst partmap-raid6rec_mod-disk_raid6_recover.lst
2184COMMANDFILES += cmd-raid6rec_mod-disk_raid6_recover.lst
2185FSFILES += fs-raid6rec_mod-disk_raid6_recover.lst
2186PARTMAPFILES += partmap-raid6rec_mod-disk_raid6_recover.lst
2187
2188cmd-raid6rec_mod-disk_raid6_recover.lst: disk/raid6_recover.c $(disk/raid6_recover.c_DEPENDENCIES) gencmdlist.sh
2189 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid6rec_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh raid6rec > $@ || (rm -f $@; exit 1)
2190
2191fs-raid6rec_mod-disk_raid6_recover.lst: disk/raid6_recover.c $(disk/raid6_recover.c_DEPENDENCIES) genfslist.sh
2192 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid6rec_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh raid6rec > $@ || (rm -f $@; exit 1)
2193
2194partmap-raid6rec_mod-disk_raid6_recover.lst: disk/raid6_recover.c $(disk/raid6_recover.c_DEPENDENCIES) genpartmaplist.sh
2195 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(raid6rec_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh raid6rec > $@ || (rm -f $@; exit 1)
2196
2197
2198raid6rec_mod_CFLAGS = $(COMMON_CFLAGS)
2199raid6rec_mod_LDFLAGS = $(COMMON_LDFLAGS)
2200
2201# For mdraid.mod
2202mdraid_mod_SOURCES = disk/mdraid_linux.c
2203CLEANFILES += mdraid.mod mod-mdraid.o mod-mdraid.c pre-mdraid.o mdraid_mod-disk_mdraid_linux.o und-mdraid.lst
2204ifneq ($(mdraid_mod_EXPORTS),no)
2205CLEANFILES += def-mdraid.lst
2206DEFSYMFILES += def-mdraid.lst
2207endif
2208MOSTLYCLEANFILES += mdraid_mod-disk_mdraid_linux.d
2209UNDSYMFILES += und-mdraid.lst
2210
2211mdraid.mod: pre-mdraid.o mod-mdraid.o $(TARGET_OBJ2ELF)
2212 -rm -f $@
2213 $(TARGET_CC) $(mdraid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-mdraid.o mod-mdraid.o
2214 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2215 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2216
2217pre-mdraid.o: $(mdraid_mod_DEPENDENCIES) mdraid_mod-disk_mdraid_linux.o
2218 -rm -f $@
2219 $(TARGET_CC) $(mdraid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ mdraid_mod-disk_mdraid_linux.o
2220
2221mod-mdraid.o: mod-mdraid.c
2222 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(mdraid_mod_CFLAGS) -c -o $@ $<
2223
926b9823 2224mod-mdraid.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
5ed20adc 2225 sh $(srcdir)/genmodsrc.sh 'mdraid' $< > $@ || (rm -f $@; exit 1)
2226
2227ifneq ($(mdraid_mod_EXPORTS),no)
2228def-mdraid.lst: pre-mdraid.o
2229 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 mdraid/' > $@
2230endif
2231
2232und-mdraid.lst: pre-mdraid.o
2233 echo 'mdraid' > $@
2234 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2235
2236mdraid_mod-disk_mdraid_linux.o: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES)
2237 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(mdraid_mod_CFLAGS) -MD -c -o $@ $<
2238-include mdraid_mod-disk_mdraid_linux.d
2239
2240CLEANFILES += cmd-mdraid_mod-disk_mdraid_linux.lst fs-mdraid_mod-disk_mdraid_linux.lst partmap-mdraid_mod-disk_mdraid_linux.lst
2241COMMANDFILES += cmd-mdraid_mod-disk_mdraid_linux.lst
2242FSFILES += fs-mdraid_mod-disk_mdraid_linux.lst
2243PARTMAPFILES += partmap-mdraid_mod-disk_mdraid_linux.lst
2244
2245cmd-mdraid_mod-disk_mdraid_linux.lst: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES) gencmdlist.sh
2246 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(mdraid_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh mdraid > $@ || (rm -f $@; exit 1)
2247
2248fs-mdraid_mod-disk_mdraid_linux.lst: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES) genfslist.sh
2249 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(mdraid_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh mdraid > $@ || (rm -f $@; exit 1)
2250
2251partmap-mdraid_mod-disk_mdraid_linux.lst: disk/mdraid_linux.c $(disk/mdraid_linux.c_DEPENDENCIES) genpartmaplist.sh
2252 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(mdraid_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh mdraid > $@ || (rm -f $@; exit 1)
2253
2254
2255mdraid_mod_CFLAGS = $(COMMON_CFLAGS)
2256mdraid_mod_LDFLAGS = $(COMMON_LDFLAGS)
2257
2258# For dm_nv.mod
2259dm_nv_mod_SOURCES = disk/dmraid_nvidia.c
2260CLEANFILES += dm_nv.mod mod-dm_nv.o mod-dm_nv.c pre-dm_nv.o dm_nv_mod-disk_dmraid_nvidia.o und-dm_nv.lst
2261ifneq ($(dm_nv_mod_EXPORTS),no)
2262CLEANFILES += def-dm_nv.lst
2263DEFSYMFILES += def-dm_nv.lst
2264endif
2265MOSTLYCLEANFILES += dm_nv_mod-disk_dmraid_nvidia.d
2266UNDSYMFILES += und-dm_nv.lst
2267
2268dm_nv.mod: pre-dm_nv.o mod-dm_nv.o $(TARGET_OBJ2ELF)
2269 -rm -f $@
2270 $(TARGET_CC) $(dm_nv_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-dm_nv.o mod-dm_nv.o
2271 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2272 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2273
2274pre-dm_nv.o: $(dm_nv_mod_DEPENDENCIES) dm_nv_mod-disk_dmraid_nvidia.o
2275 -rm -f $@
2276 $(TARGET_CC) $(dm_nv_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ dm_nv_mod-disk_dmraid_nvidia.o
2277
2278mod-dm_nv.o: mod-dm_nv.c
2279 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(dm_nv_mod_CFLAGS) -c -o $@ $<
2280
926b9823 2281mod-dm_nv.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
5ed20adc 2282 sh $(srcdir)/genmodsrc.sh 'dm_nv' $< > $@ || (rm -f $@; exit 1)
2283
2284ifneq ($(dm_nv_mod_EXPORTS),no)
2285def-dm_nv.lst: pre-dm_nv.o
2286 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 dm_nv/' > $@
2287endif
2288
2289und-dm_nv.lst: pre-dm_nv.o
2290 echo 'dm_nv' > $@
2291 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2292
2293dm_nv_mod-disk_dmraid_nvidia.o: disk/dmraid_nvidia.c $(disk/dmraid_nvidia.c_DEPENDENCIES)
2294 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(dm_nv_mod_CFLAGS) -MD -c -o $@ $<
2295-include dm_nv_mod-disk_dmraid_nvidia.d
2296
2297CLEANFILES += cmd-dm_nv_mod-disk_dmraid_nvidia.lst fs-dm_nv_mod-disk_dmraid_nvidia.lst partmap-dm_nv_mod-disk_dmraid_nvidia.lst
2298COMMANDFILES += cmd-dm_nv_mod-disk_dmraid_nvidia.lst
2299FSFILES += fs-dm_nv_mod-disk_dmraid_nvidia.lst
2300PARTMAPFILES += partmap-dm_nv_mod-disk_dmraid_nvidia.lst
2301
2302cmd-dm_nv_mod-disk_dmraid_nvidia.lst: disk/dmraid_nvidia.c $(disk/dmraid_nvidia.c_DEPENDENCIES) gencmdlist.sh
2303 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(dm_nv_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh dm_nv > $@ || (rm -f $@; exit 1)
2304
2305fs-dm_nv_mod-disk_dmraid_nvidia.lst: disk/dmraid_nvidia.c $(disk/dmraid_nvidia.c_DEPENDENCIES) genfslist.sh
2306 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(dm_nv_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh dm_nv > $@ || (rm -f $@; exit 1)
2307
2308partmap-dm_nv_mod-disk_dmraid_nvidia.lst: disk/dmraid_nvidia.c $(disk/dmraid_nvidia.c_DEPENDENCIES) genpartmaplist.sh
2309 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(dm_nv_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh dm_nv > $@ || (rm -f $@; exit 1)
2310
2311
2312dm_nv_mod_CFLAGS = $(COMMON_CFLAGS)
2313dm_nv_mod_LDFLAGS = $(COMMON_LDFLAGS)
2314
2315# For lvm.mod
2b002173 2316lvm_mod_SOURCES = disk/lvm.c
2317CLEANFILES += lvm.mod mod-lvm.o mod-lvm.c pre-lvm.o lvm_mod-disk_lvm.o und-lvm.lst
2318ifneq ($(lvm_mod_EXPORTS),no)
2319CLEANFILES += def-lvm.lst
2320DEFSYMFILES += def-lvm.lst
2321endif
2322MOSTLYCLEANFILES += lvm_mod-disk_lvm.d
2323UNDSYMFILES += und-lvm.lst
2324
2a8a80e4 2325lvm.mod: pre-lvm.o mod-lvm.o $(TARGET_OBJ2ELF)
2b002173 2326 -rm -f $@
2a8a80e4 2327 $(TARGET_CC) $(lvm_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-lvm.o mod-lvm.o
2328 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2329 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2b002173 2330
2331pre-lvm.o: $(lvm_mod_DEPENDENCIES) lvm_mod-disk_lvm.o
2332 -rm -f $@
2333 $(TARGET_CC) $(lvm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ lvm_mod-disk_lvm.o
2334
2335mod-lvm.o: mod-lvm.c
2336 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lvm_mod_CFLAGS) -c -o $@ $<
2337
926b9823 2338mod-lvm.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2b002173 2339 sh $(srcdir)/genmodsrc.sh 'lvm' $< > $@ || (rm -f $@; exit 1)
2340
2341ifneq ($(lvm_mod_EXPORTS),no)
2342def-lvm.lst: pre-lvm.o
2343 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lvm/' > $@
2344endif
2345
2346und-lvm.lst: pre-lvm.o
2347 echo 'lvm' > $@
2348 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2349
7d31f41f 2350lvm_mod-disk_lvm.o: disk/lvm.c $(disk/lvm.c_DEPENDENCIES)
46e5e5cb 2351 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lvm_mod_CFLAGS) -MD -c -o $@ $<
2b002173 2352-include lvm_mod-disk_lvm.d
2353
228ffeab 2354CLEANFILES += cmd-lvm_mod-disk_lvm.lst fs-lvm_mod-disk_lvm.lst partmap-lvm_mod-disk_lvm.lst
2b002173 2355COMMANDFILES += cmd-lvm_mod-disk_lvm.lst
2356FSFILES += fs-lvm_mod-disk_lvm.lst
228ffeab 2357PARTMAPFILES += partmap-lvm_mod-disk_lvm.lst
2b002173 2358
7d31f41f 2359cmd-lvm_mod-disk_lvm.lst: disk/lvm.c $(disk/lvm.c_DEPENDENCIES) gencmdlist.sh
2b002173 2360 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lvm_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh lvm > $@ || (rm -f $@; exit 1)
2361
7d31f41f 2362fs-lvm_mod-disk_lvm.lst: disk/lvm.c $(disk/lvm.c_DEPENDENCIES) genfslist.sh
2b002173 2363 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lvm_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh lvm > $@ || (rm -f $@; exit 1)
2364
228ffeab 2365partmap-lvm_mod-disk_lvm.lst: disk/lvm.c $(disk/lvm.c_DEPENDENCIES) genpartmaplist.sh
2366 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lvm_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh lvm > $@ || (rm -f $@; exit 1)
2367
2b002173 2368
2369lvm_mod_CFLAGS = $(COMMON_CFLAGS)
2370lvm_mod_LDFLAGS = $(COMMON_LDFLAGS)
233b1628 2371
965c75ca 2372# For scsi.mod
2373scsi_mod_SOURCES = disk/scsi.c
2374CLEANFILES += scsi.mod mod-scsi.o mod-scsi.c pre-scsi.o scsi_mod-disk_scsi.o und-scsi.lst
2375ifneq ($(scsi_mod_EXPORTS),no)
2376CLEANFILES += def-scsi.lst
2377DEFSYMFILES += def-scsi.lst
2378endif
2379MOSTLYCLEANFILES += scsi_mod-disk_scsi.d
2380UNDSYMFILES += und-scsi.lst
2381
2382scsi.mod: pre-scsi.o mod-scsi.o $(TARGET_OBJ2ELF)
2383 -rm -f $@
2384 $(TARGET_CC) $(scsi_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-scsi.o mod-scsi.o
2385 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2386 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2387
2388pre-scsi.o: $(scsi_mod_DEPENDENCIES) scsi_mod-disk_scsi.o
2389 -rm -f $@
2390 $(TARGET_CC) $(scsi_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ scsi_mod-disk_scsi.o
2391
2392mod-scsi.o: mod-scsi.c
2393 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(scsi_mod_CFLAGS) -c -o $@ $<
2394
926b9823 2395mod-scsi.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
965c75ca 2396 sh $(srcdir)/genmodsrc.sh 'scsi' $< > $@ || (rm -f $@; exit 1)
2397
2398ifneq ($(scsi_mod_EXPORTS),no)
2399def-scsi.lst: pre-scsi.o
2400 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 scsi/' > $@
2401endif
2402
2403und-scsi.lst: pre-scsi.o
2404 echo 'scsi' > $@
2405 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2406
2407scsi_mod-disk_scsi.o: disk/scsi.c $(disk/scsi.c_DEPENDENCIES)
2408 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(scsi_mod_CFLAGS) -MD -c -o $@ $<
2409-include scsi_mod-disk_scsi.d
2410
2411CLEANFILES += cmd-scsi_mod-disk_scsi.lst fs-scsi_mod-disk_scsi.lst partmap-scsi_mod-disk_scsi.lst
2412COMMANDFILES += cmd-scsi_mod-disk_scsi.lst
2413FSFILES += fs-scsi_mod-disk_scsi.lst
2414PARTMAPFILES += partmap-scsi_mod-disk_scsi.lst
2415
2416cmd-scsi_mod-disk_scsi.lst: disk/scsi.c $(disk/scsi.c_DEPENDENCIES) gencmdlist.sh
2417 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(scsi_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh scsi > $@ || (rm -f $@; exit 1)
2418
2419fs-scsi_mod-disk_scsi.lst: disk/scsi.c $(disk/scsi.c_DEPENDENCIES) genfslist.sh
2420 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(scsi_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh scsi > $@ || (rm -f $@; exit 1)
2421
2422partmap-scsi_mod-disk_scsi.lst: disk/scsi.c $(disk/scsi.c_DEPENDENCIES) genpartmaplist.sh
2423 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(scsi_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh scsi > $@ || (rm -f $@; exit 1)
2424
2425
2426scsi_mod_CFLAGS = $(COMMON_CFLAGS)
2427scsi_mod_LDFLAGS = $(COMMON_LDFLAGS)
2428
233b1628 2429# Commands.
4931827f 2430pkglib_MODULES += hello.mod boot.mod terminal.mod ls.mod \
d098b090 2431 cmp.mod cat.mod help.mod search.mod \
aebe3d13 2432 loopback.mod fs_uuid.mod configfile.mod echo.mod \
4020aa53 2433 terminfo.mod test.mod blocklist.mod hexdump.mod \
d098b090 2434 read.mod sleep.mod loadenv.mod crc.mod
233b1628 2435
2436# For hello.mod.
2437hello_mod_SOURCES = hello/hello.c
83709125 2438CLEANFILES += hello.mod mod-hello.o mod-hello.c pre-hello.o hello_mod-hello_hello.o und-hello.lst
2439ifneq ($(hello_mod_EXPORTS),no)
2440CLEANFILES += def-hello.lst
233b1628 2441DEFSYMFILES += def-hello.lst
83709125 2442endif
2443MOSTLYCLEANFILES += hello_mod-hello_hello.d
233b1628 2444UNDSYMFILES += und-hello.lst
2445
2a8a80e4 2446hello.mod: pre-hello.o mod-hello.o $(TARGET_OBJ2ELF)
233b1628 2447 -rm -f $@
2a8a80e4 2448 $(TARGET_CC) $(hello_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-hello.o mod-hello.o
2449 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2450 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2451
e02ac02c 2452pre-hello.o: $(hello_mod_DEPENDENCIES) hello_mod-hello_hello.o
233b1628 2453 -rm -f $@
e02ac02c 2454 $(TARGET_CC) $(hello_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hello_mod-hello_hello.o
233b1628 2455
2456mod-hello.o: mod-hello.c
b977bf01 2457 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $<
233b1628 2458
926b9823 2459mod-hello.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2460 sh $(srcdir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exit 1)
2461
83709125 2462ifneq ($(hello_mod_EXPORTS),no)
233b1628 2463def-hello.lst: pre-hello.o
2464 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hello/' > $@
83709125 2465endif
233b1628 2466
2467und-hello.lst: pre-hello.o
2468 echo 'hello' > $@
2469 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2470
7d31f41f 2471hello_mod-hello_hello.o: hello/hello.c $(hello/hello.c_DEPENDENCIES)
46e5e5cb 2472 $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2473-include hello_mod-hello_hello.d
2474
228ffeab 2475CLEANFILES += cmd-hello_mod-hello_hello.lst fs-hello_mod-hello_hello.lst partmap-hello_mod-hello_hello.lst
233b1628 2476COMMANDFILES += cmd-hello_mod-hello_hello.lst
2477FSFILES += fs-hello_mod-hello_hello.lst
228ffeab 2478PARTMAPFILES += partmap-hello_mod-hello_hello.lst
233b1628 2479
7d31f41f 2480cmd-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2481 set -e; $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh hello > $@ || (rm -f $@; exit 1)
233b1628 2482
7d31f41f 2483fs-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) genfslist.sh
26c607b9 2484 set -e; $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh hello > $@ || (rm -f $@; exit 1)
233b1628 2485
228ffeab 2486partmap-hello_mod-hello_hello.lst: hello/hello.c $(hello/hello.c_DEPENDENCIES) genpartmaplist.sh
2487 set -e; $(TARGET_CC) -Ihello -I$(srcdir)/hello $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hello_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh hello > $@ || (rm -f $@; exit 1)
2488
233b1628 2489
2490hello_mod_CFLAGS = $(COMMON_CFLAGS)
2491hello_mod_LDFLAGS = $(COMMON_LDFLAGS)
2492
2493# For boot.mod.
2494boot_mod_SOURCES = commands/boot.c
83709125 2495CLEANFILES += boot.mod mod-boot.o mod-boot.c pre-boot.o boot_mod-commands_boot.o und-boot.lst
2496ifneq ($(boot_mod_EXPORTS),no)
2497CLEANFILES += def-boot.lst
233b1628 2498DEFSYMFILES += def-boot.lst
83709125 2499endif
2500MOSTLYCLEANFILES += boot_mod-commands_boot.d
233b1628 2501UNDSYMFILES += und-boot.lst
2502
2a8a80e4 2503boot.mod: pre-boot.o mod-boot.o $(TARGET_OBJ2ELF)
233b1628 2504 -rm -f $@
2a8a80e4 2505 $(TARGET_CC) $(boot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-boot.o mod-boot.o
2506 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2507 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2508
e02ac02c 2509pre-boot.o: $(boot_mod_DEPENDENCIES) boot_mod-commands_boot.o
233b1628 2510 -rm -f $@
e02ac02c 2511 $(TARGET_CC) $(boot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ boot_mod-commands_boot.o
233b1628 2512
2513mod-boot.o: mod-boot.c
b977bf01 2514 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(boot_mod_CFLAGS) -c -o $@ $<
233b1628 2515
926b9823 2516mod-boot.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2517 sh $(srcdir)/genmodsrc.sh 'boot' $< > $@ || (rm -f $@; exit 1)
2518
83709125 2519ifneq ($(boot_mod_EXPORTS),no)
233b1628 2520def-boot.lst: pre-boot.o
2521 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 boot/' > $@
83709125 2522endif
233b1628 2523
2524und-boot.lst: pre-boot.o
2525 echo 'boot' > $@
2526 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2527
7d31f41f 2528boot_mod-commands_boot.o: commands/boot.c $(commands/boot.c_DEPENDENCIES)
46e5e5cb 2529 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(boot_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2530-include boot_mod-commands_boot.d
2531
228ffeab 2532CLEANFILES += cmd-boot_mod-commands_boot.lst fs-boot_mod-commands_boot.lst partmap-boot_mod-commands_boot.lst
233b1628 2533COMMANDFILES += cmd-boot_mod-commands_boot.lst
2534FSFILES += fs-boot_mod-commands_boot.lst
228ffeab 2535PARTMAPFILES += partmap-boot_mod-commands_boot.lst
233b1628 2536
7d31f41f 2537cmd-boot_mod-commands_boot.lst: commands/boot.c $(commands/boot.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2538 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(boot_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh boot > $@ || (rm -f $@; exit 1)
233b1628 2539
7d31f41f 2540fs-boot_mod-commands_boot.lst: commands/boot.c $(commands/boot.c_DEPENDENCIES) genfslist.sh
26c607b9 2541 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(boot_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh boot > $@ || (rm -f $@; exit 1)
233b1628 2542
228ffeab 2543partmap-boot_mod-commands_boot.lst: commands/boot.c $(commands/boot.c_DEPENDENCIES) genpartmaplist.sh
2544 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(boot_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh boot > $@ || (rm -f $@; exit 1)
2545
233b1628 2546
2547boot_mod_CFLAGS = $(COMMON_CFLAGS)
2548boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
2549
2550# For terminal.mod.
2551terminal_mod_SOURCES = commands/terminal.c
83709125 2552CLEANFILES += terminal.mod mod-terminal.o mod-terminal.c pre-terminal.o terminal_mod-commands_terminal.o und-terminal.lst
2553ifneq ($(terminal_mod_EXPORTS),no)
2554CLEANFILES += def-terminal.lst
233b1628 2555DEFSYMFILES += def-terminal.lst
83709125 2556endif
2557MOSTLYCLEANFILES += terminal_mod-commands_terminal.d
233b1628 2558UNDSYMFILES += und-terminal.lst
2559
2a8a80e4 2560terminal.mod: pre-terminal.o mod-terminal.o $(TARGET_OBJ2ELF)
233b1628 2561 -rm -f $@
2a8a80e4 2562 $(TARGET_CC) $(terminal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-terminal.o mod-terminal.o
2563 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2564 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2565
e02ac02c 2566pre-terminal.o: $(terminal_mod_DEPENDENCIES) terminal_mod-commands_terminal.o
233b1628 2567 -rm -f $@
e02ac02c 2568 $(TARGET_CC) $(terminal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ terminal_mod-commands_terminal.o
233b1628 2569
2570mod-terminal.o: mod-terminal.c
b977bf01 2571 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminal_mod_CFLAGS) -c -o $@ $<
233b1628 2572
926b9823 2573mod-terminal.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2574 sh $(srcdir)/genmodsrc.sh 'terminal' $< > $@ || (rm -f $@; exit 1)
2575
83709125 2576ifneq ($(terminal_mod_EXPORTS),no)
233b1628 2577def-terminal.lst: pre-terminal.o
2578 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 terminal/' > $@
83709125 2579endif
233b1628 2580
2581und-terminal.lst: pre-terminal.o
2582 echo 'terminal' > $@
2583 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2584
7d31f41f 2585terminal_mod-commands_terminal.o: commands/terminal.c $(commands/terminal.c_DEPENDENCIES)
46e5e5cb 2586 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminal_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2587-include terminal_mod-commands_terminal.d
2588
228ffeab 2589CLEANFILES += cmd-terminal_mod-commands_terminal.lst fs-terminal_mod-commands_terminal.lst partmap-terminal_mod-commands_terminal.lst
233b1628 2590COMMANDFILES += cmd-terminal_mod-commands_terminal.lst
2591FSFILES += fs-terminal_mod-commands_terminal.lst
228ffeab 2592PARTMAPFILES += partmap-terminal_mod-commands_terminal.lst
233b1628 2593
7d31f41f 2594cmd-terminal_mod-commands_terminal.lst: commands/terminal.c $(commands/terminal.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2595 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminal_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh terminal > $@ || (rm -f $@; exit 1)
233b1628 2596
7d31f41f 2597fs-terminal_mod-commands_terminal.lst: commands/terminal.c $(commands/terminal.c_DEPENDENCIES) genfslist.sh
26c607b9 2598 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminal_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh terminal > $@ || (rm -f $@; exit 1)
233b1628 2599
228ffeab 2600partmap-terminal_mod-commands_terminal.lst: commands/terminal.c $(commands/terminal.c_DEPENDENCIES) genpartmaplist.sh
2601 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminal_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh terminal > $@ || (rm -f $@; exit 1)
2602
233b1628 2603
2604terminal_mod_CFLAGS = $(COMMON_CFLAGS)
2605terminal_mod_LDFLAGS = $(COMMON_LDFLAGS)
2606
2607# For ls.mod.
2608ls_mod_SOURCES = commands/ls.c
83709125 2609CLEANFILES += ls.mod mod-ls.o mod-ls.c pre-ls.o ls_mod-commands_ls.o und-ls.lst
2610ifneq ($(ls_mod_EXPORTS),no)
2611CLEANFILES += def-ls.lst
233b1628 2612DEFSYMFILES += def-ls.lst
83709125 2613endif
2614MOSTLYCLEANFILES += ls_mod-commands_ls.d
233b1628 2615UNDSYMFILES += und-ls.lst
2616
2a8a80e4 2617ls.mod: pre-ls.o mod-ls.o $(TARGET_OBJ2ELF)
233b1628 2618 -rm -f $@
2a8a80e4 2619 $(TARGET_CC) $(ls_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-ls.o mod-ls.o
2620 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2621 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2622
e02ac02c 2623pre-ls.o: $(ls_mod_DEPENDENCIES) ls_mod-commands_ls.o
233b1628 2624 -rm -f $@
e02ac02c 2625 $(TARGET_CC) $(ls_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ ls_mod-commands_ls.o
233b1628 2626
2627mod-ls.o: mod-ls.c
b977bf01 2628 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ls_mod_CFLAGS) -c -o $@ $<
233b1628 2629
926b9823 2630mod-ls.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2631 sh $(srcdir)/genmodsrc.sh 'ls' $< > $@ || (rm -f $@; exit 1)
2632
83709125 2633ifneq ($(ls_mod_EXPORTS),no)
233b1628 2634def-ls.lst: pre-ls.o
2635 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ls/' > $@
83709125 2636endif
233b1628 2637
2638und-ls.lst: pre-ls.o
2639 echo 'ls' > $@
2640 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2641
7d31f41f 2642ls_mod-commands_ls.o: commands/ls.c $(commands/ls.c_DEPENDENCIES)
46e5e5cb 2643 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ls_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2644-include ls_mod-commands_ls.d
2645
228ffeab 2646CLEANFILES += cmd-ls_mod-commands_ls.lst fs-ls_mod-commands_ls.lst partmap-ls_mod-commands_ls.lst
233b1628 2647COMMANDFILES += cmd-ls_mod-commands_ls.lst
2648FSFILES += fs-ls_mod-commands_ls.lst
228ffeab 2649PARTMAPFILES += partmap-ls_mod-commands_ls.lst
233b1628 2650
7d31f41f 2651cmd-ls_mod-commands_ls.lst: commands/ls.c $(commands/ls.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2652 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ls_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh ls > $@ || (rm -f $@; exit 1)
233b1628 2653
7d31f41f 2654fs-ls_mod-commands_ls.lst: commands/ls.c $(commands/ls.c_DEPENDENCIES) genfslist.sh
26c607b9 2655 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ls_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh ls > $@ || (rm -f $@; exit 1)
233b1628 2656
228ffeab 2657partmap-ls_mod-commands_ls.lst: commands/ls.c $(commands/ls.c_DEPENDENCIES) genpartmaplist.sh
2658 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(ls_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh ls > $@ || (rm -f $@; exit 1)
2659
233b1628 2660
2661ls_mod_CFLAGS = $(COMMON_CFLAGS)
2662ls_mod_LDFLAGS = $(COMMON_LDFLAGS)
2663
2664# For cmp.mod.
2665cmp_mod_SOURCES = commands/cmp.c
83709125 2666CLEANFILES += cmp.mod mod-cmp.o mod-cmp.c pre-cmp.o cmp_mod-commands_cmp.o und-cmp.lst
2667ifneq ($(cmp_mod_EXPORTS),no)
2668CLEANFILES += def-cmp.lst
233b1628 2669DEFSYMFILES += def-cmp.lst
83709125 2670endif
2671MOSTLYCLEANFILES += cmp_mod-commands_cmp.d
233b1628 2672UNDSYMFILES += und-cmp.lst
2673
2a8a80e4 2674cmp.mod: pre-cmp.o mod-cmp.o $(TARGET_OBJ2ELF)
233b1628 2675 -rm -f $@
2a8a80e4 2676 $(TARGET_CC) $(cmp_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-cmp.o mod-cmp.o
2677 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2678 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2679
e02ac02c 2680pre-cmp.o: $(cmp_mod_DEPENDENCIES) cmp_mod-commands_cmp.o
233b1628 2681 -rm -f $@
e02ac02c 2682 $(TARGET_CC) $(cmp_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ cmp_mod-commands_cmp.o
233b1628 2683
2684mod-cmp.o: mod-cmp.c
b977bf01 2685 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cmp_mod_CFLAGS) -c -o $@ $<
233b1628 2686
926b9823 2687mod-cmp.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2688 sh $(srcdir)/genmodsrc.sh 'cmp' $< > $@ || (rm -f $@; exit 1)
2689
83709125 2690ifneq ($(cmp_mod_EXPORTS),no)
233b1628 2691def-cmp.lst: pre-cmp.o
2692 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cmp/' > $@
83709125 2693endif
233b1628 2694
2695und-cmp.lst: pre-cmp.o
2696 echo 'cmp' > $@
2697 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2698
7d31f41f 2699cmp_mod-commands_cmp.o: commands/cmp.c $(commands/cmp.c_DEPENDENCIES)
46e5e5cb 2700 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cmp_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2701-include cmp_mod-commands_cmp.d
2702
228ffeab 2703CLEANFILES += cmd-cmp_mod-commands_cmp.lst fs-cmp_mod-commands_cmp.lst partmap-cmp_mod-commands_cmp.lst
233b1628 2704COMMANDFILES += cmd-cmp_mod-commands_cmp.lst
2705FSFILES += fs-cmp_mod-commands_cmp.lst
228ffeab 2706PARTMAPFILES += partmap-cmp_mod-commands_cmp.lst
233b1628 2707
7d31f41f 2708cmd-cmp_mod-commands_cmp.lst: commands/cmp.c $(commands/cmp.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2709 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cmp_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh cmp > $@ || (rm -f $@; exit 1)
233b1628 2710
7d31f41f 2711fs-cmp_mod-commands_cmp.lst: commands/cmp.c $(commands/cmp.c_DEPENDENCIES) genfslist.sh
26c607b9 2712 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cmp_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh cmp > $@ || (rm -f $@; exit 1)
233b1628 2713
228ffeab 2714partmap-cmp_mod-commands_cmp.lst: commands/cmp.c $(commands/cmp.c_DEPENDENCIES) genpartmaplist.sh
2715 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cmp_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh cmp > $@ || (rm -f $@; exit 1)
2716
233b1628 2717
2718cmp_mod_CFLAGS = $(COMMON_CFLAGS)
2719cmp_mod_LDFLAGS = $(COMMON_LDFLAGS)
2720
2721# For cat.mod.
2722cat_mod_SOURCES = commands/cat.c
83709125 2723CLEANFILES += cat.mod mod-cat.o mod-cat.c pre-cat.o cat_mod-commands_cat.o und-cat.lst
2724ifneq ($(cat_mod_EXPORTS),no)
2725CLEANFILES += def-cat.lst
233b1628 2726DEFSYMFILES += def-cat.lst
83709125 2727endif
2728MOSTLYCLEANFILES += cat_mod-commands_cat.d
233b1628 2729UNDSYMFILES += und-cat.lst
2730
2a8a80e4 2731cat.mod: pre-cat.o mod-cat.o $(TARGET_OBJ2ELF)
233b1628 2732 -rm -f $@
2a8a80e4 2733 $(TARGET_CC) $(cat_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-cat.o mod-cat.o
2734 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2735 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2736
e02ac02c 2737pre-cat.o: $(cat_mod_DEPENDENCIES) cat_mod-commands_cat.o
233b1628 2738 -rm -f $@
e02ac02c 2739 $(TARGET_CC) $(cat_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ cat_mod-commands_cat.o
233b1628 2740
2741mod-cat.o: mod-cat.c
b977bf01 2742 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cat_mod_CFLAGS) -c -o $@ $<
233b1628 2743
926b9823 2744mod-cat.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2745 sh $(srcdir)/genmodsrc.sh 'cat' $< > $@ || (rm -f $@; exit 1)
2746
83709125 2747ifneq ($(cat_mod_EXPORTS),no)
233b1628 2748def-cat.lst: pre-cat.o
2749 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cat/' > $@
83709125 2750endif
233b1628 2751
2752und-cat.lst: pre-cat.o
2753 echo 'cat' > $@
2754 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2755
7d31f41f 2756cat_mod-commands_cat.o: commands/cat.c $(commands/cat.c_DEPENDENCIES)
46e5e5cb 2757 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cat_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2758-include cat_mod-commands_cat.d
2759
228ffeab 2760CLEANFILES += cmd-cat_mod-commands_cat.lst fs-cat_mod-commands_cat.lst partmap-cat_mod-commands_cat.lst
233b1628 2761COMMANDFILES += cmd-cat_mod-commands_cat.lst
2762FSFILES += fs-cat_mod-commands_cat.lst
228ffeab 2763PARTMAPFILES += partmap-cat_mod-commands_cat.lst
233b1628 2764
7d31f41f 2765cmd-cat_mod-commands_cat.lst: commands/cat.c $(commands/cat.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2766 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cat_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh cat > $@ || (rm -f $@; exit 1)
233b1628 2767
7d31f41f 2768fs-cat_mod-commands_cat.lst: commands/cat.c $(commands/cat.c_DEPENDENCIES) genfslist.sh
26c607b9 2769 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cat_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh cat > $@ || (rm -f $@; exit 1)
233b1628 2770
228ffeab 2771partmap-cat_mod-commands_cat.lst: commands/cat.c $(commands/cat.c_DEPENDENCIES) genpartmaplist.sh
2772 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cat_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh cat > $@ || (rm -f $@; exit 1)
2773
233b1628 2774
2775cat_mod_CFLAGS = $(COMMON_CFLAGS)
2776cat_mod_LDFLAGS = $(COMMON_LDFLAGS)
2777
b5ef1102 2778# For echo.mod
2779echo_mod_SOURCES = commands/echo.c
a83ccafd 2780CLEANFILES += echo.mod mod-echo.o mod-echo.c pre-echo.o echo_mod-commands_echo.o und-echo.lst
2781ifneq ($(echo_mod_EXPORTS),no)
2782CLEANFILES += def-echo.lst
2783DEFSYMFILES += def-echo.lst
2784endif
2785MOSTLYCLEANFILES += echo_mod-commands_echo.d
2786UNDSYMFILES += und-echo.lst
2787
2a8a80e4 2788echo.mod: pre-echo.o mod-echo.o $(TARGET_OBJ2ELF)
a83ccafd 2789 -rm -f $@
2a8a80e4 2790 $(TARGET_CC) $(echo_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-echo.o mod-echo.o
2791 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2792 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
a83ccafd 2793
2794pre-echo.o: $(echo_mod_DEPENDENCIES) echo_mod-commands_echo.o
2795 -rm -f $@
2796 $(TARGET_CC) $(echo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ echo_mod-commands_echo.o
2797
2798mod-echo.o: mod-echo.c
2799 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(echo_mod_CFLAGS) -c -o $@ $<
2800
926b9823 2801mod-echo.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
a83ccafd 2802 sh $(srcdir)/genmodsrc.sh 'echo' $< > $@ || (rm -f $@; exit 1)
2803
2804ifneq ($(echo_mod_EXPORTS),no)
2805def-echo.lst: pre-echo.o
2806 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 echo/' > $@
2807endif
2808
2809und-echo.lst: pre-echo.o
2810 echo 'echo' > $@
2811 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2812
7d31f41f 2813echo_mod-commands_echo.o: commands/echo.c $(commands/echo.c_DEPENDENCIES)
a83ccafd 2814 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(echo_mod_CFLAGS) -MD -c -o $@ $<
2815-include echo_mod-commands_echo.d
2816
228ffeab 2817CLEANFILES += cmd-echo_mod-commands_echo.lst fs-echo_mod-commands_echo.lst partmap-echo_mod-commands_echo.lst
a83ccafd 2818COMMANDFILES += cmd-echo_mod-commands_echo.lst
2819FSFILES += fs-echo_mod-commands_echo.lst
228ffeab 2820PARTMAPFILES += partmap-echo_mod-commands_echo.lst
a83ccafd 2821
7d31f41f 2822cmd-echo_mod-commands_echo.lst: commands/echo.c $(commands/echo.c_DEPENDENCIES) gencmdlist.sh
a83ccafd 2823 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(echo_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh echo > $@ || (rm -f $@; exit 1)
2824
7d31f41f 2825fs-echo_mod-commands_echo.lst: commands/echo.c $(commands/echo.c_DEPENDENCIES) genfslist.sh
a83ccafd 2826 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(echo_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh echo > $@ || (rm -f $@; exit 1)
2827
228ffeab 2828partmap-echo_mod-commands_echo.lst: commands/echo.c $(commands/echo.c_DEPENDENCIES) genpartmaplist.sh
2829 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(echo_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh echo > $@ || (rm -f $@; exit 1)
2830
a83ccafd 2831
b5ef1102 2832echo_mod_CFLAGS = $(COMMON_CFLAGS)
2833echo_mod_LDFLAGS = $(COMMON_LDFLAGS)
2834
233b1628 2835# For help.mod.
2836help_mod_SOURCES = commands/help.c
83709125 2837CLEANFILES += help.mod mod-help.o mod-help.c pre-help.o help_mod-commands_help.o und-help.lst
2838ifneq ($(help_mod_EXPORTS),no)
2839CLEANFILES += def-help.lst
233b1628 2840DEFSYMFILES += def-help.lst
83709125 2841endif
2842MOSTLYCLEANFILES += help_mod-commands_help.d
233b1628 2843UNDSYMFILES += und-help.lst
2844
2a8a80e4 2845help.mod: pre-help.o mod-help.o $(TARGET_OBJ2ELF)
233b1628 2846 -rm -f $@
2a8a80e4 2847 $(TARGET_CC) $(help_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-help.o mod-help.o
2848 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2849 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2850
e02ac02c 2851pre-help.o: $(help_mod_DEPENDENCIES) help_mod-commands_help.o
233b1628 2852 -rm -f $@
e02ac02c 2853 $(TARGET_CC) $(help_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ help_mod-commands_help.o
233b1628 2854
2855mod-help.o: mod-help.c
b977bf01 2856 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(help_mod_CFLAGS) -c -o $@ $<
233b1628 2857
926b9823 2858mod-help.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2859 sh $(srcdir)/genmodsrc.sh 'help' $< > $@ || (rm -f $@; exit 1)
2860
83709125 2861ifneq ($(help_mod_EXPORTS),no)
233b1628 2862def-help.lst: pre-help.o
2863 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 help/' > $@
83709125 2864endif
233b1628 2865
2866und-help.lst: pre-help.o
2867 echo 'help' > $@
2868 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2869
7d31f41f 2870help_mod-commands_help.o: commands/help.c $(commands/help.c_DEPENDENCIES)
46e5e5cb 2871 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(help_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2872-include help_mod-commands_help.d
2873
228ffeab 2874CLEANFILES += cmd-help_mod-commands_help.lst fs-help_mod-commands_help.lst partmap-help_mod-commands_help.lst
233b1628 2875COMMANDFILES += cmd-help_mod-commands_help.lst
2876FSFILES += fs-help_mod-commands_help.lst
228ffeab 2877PARTMAPFILES += partmap-help_mod-commands_help.lst
233b1628 2878
7d31f41f 2879cmd-help_mod-commands_help.lst: commands/help.c $(commands/help.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2880 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(help_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh help > $@ || (rm -f $@; exit 1)
233b1628 2881
7d31f41f 2882fs-help_mod-commands_help.lst: commands/help.c $(commands/help.c_DEPENDENCIES) genfslist.sh
26c607b9 2883 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(help_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh help > $@ || (rm -f $@; exit 1)
233b1628 2884
228ffeab 2885partmap-help_mod-commands_help.lst: commands/help.c $(commands/help.c_DEPENDENCIES) genpartmaplist.sh
2886 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(help_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh help > $@ || (rm -f $@; exit 1)
2887
233b1628 2888
2889help_mod_CFLAGS = $(COMMON_CFLAGS)
2890help_mod_LDFLAGS = $(COMMON_LDFLAGS)
2891
233b1628 2892# For search.mod.
2893search_mod_SOURCES = commands/search.c
83709125 2894CLEANFILES += search.mod mod-search.o mod-search.c pre-search.o search_mod-commands_search.o und-search.lst
2895ifneq ($(search_mod_EXPORTS),no)
2896CLEANFILES += def-search.lst
233b1628 2897DEFSYMFILES += def-search.lst
83709125 2898endif
2899MOSTLYCLEANFILES += search_mod-commands_search.d
233b1628 2900UNDSYMFILES += und-search.lst
2901
2a8a80e4 2902search.mod: pre-search.o mod-search.o $(TARGET_OBJ2ELF)
233b1628 2903 -rm -f $@
2a8a80e4 2904 $(TARGET_CC) $(search_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-search.o mod-search.o
2905 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2906 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 2907
e02ac02c 2908pre-search.o: $(search_mod_DEPENDENCIES) search_mod-commands_search.o
233b1628 2909 -rm -f $@
e02ac02c 2910 $(TARGET_CC) $(search_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ search_mod-commands_search.o
233b1628 2911
2912mod-search.o: mod-search.c
b977bf01 2913 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(search_mod_CFLAGS) -c -o $@ $<
233b1628 2914
926b9823 2915mod-search.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 2916 sh $(srcdir)/genmodsrc.sh 'search' $< > $@ || (rm -f $@; exit 1)
2917
83709125 2918ifneq ($(search_mod_EXPORTS),no)
233b1628 2919def-search.lst: pre-search.o
2920 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 search/' > $@
83709125 2921endif
233b1628 2922
2923und-search.lst: pre-search.o
2924 echo 'search' > $@
2925 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2926
7d31f41f 2927search_mod-commands_search.o: commands/search.c $(commands/search.c_DEPENDENCIES)
46e5e5cb 2928 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(search_mod_CFLAGS) -MD -c -o $@ $<
233b1628 2929-include search_mod-commands_search.d
2930
228ffeab 2931CLEANFILES += cmd-search_mod-commands_search.lst fs-search_mod-commands_search.lst partmap-search_mod-commands_search.lst
233b1628 2932COMMANDFILES += cmd-search_mod-commands_search.lst
2933FSFILES += fs-search_mod-commands_search.lst
228ffeab 2934PARTMAPFILES += partmap-search_mod-commands_search.lst
233b1628 2935
7d31f41f 2936cmd-search_mod-commands_search.lst: commands/search.c $(commands/search.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2937 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(search_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh search > $@ || (rm -f $@; exit 1)
233b1628 2938
7d31f41f 2939fs-search_mod-commands_search.lst: commands/search.c $(commands/search.c_DEPENDENCIES) genfslist.sh
26c607b9 2940 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(search_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh search > $@ || (rm -f $@; exit 1)
233b1628 2941
228ffeab 2942partmap-search_mod-commands_search.lst: commands/search.c $(commands/search.c_DEPENDENCIES) genpartmaplist.sh
2943 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(search_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh search > $@ || (rm -f $@; exit 1)
2944
233b1628 2945
2946search_mod_CFLAGS = $(COMMON_CFLAGS)
2947search_mod_LDFLAGS = $(COMMON_LDFLAGS)
2948
2949# For test.mod.
2950test_mod_SOURCES = commands/test.c
83709125 2951CLEANFILES += test.mod mod-test.o mod-test.c pre-test.o test_mod-commands_test.o und-test.lst
2952ifneq ($(test_mod_EXPORTS),no)
2953CLEANFILES += def-test.lst
44b83271 2954DEFSYMFILES += def-test.lst
83709125 2955endif
2956MOSTLYCLEANFILES += test_mod-commands_test.d
44b83271 2957UNDSYMFILES += und-test.lst
2958
2a8a80e4 2959test.mod: pre-test.o mod-test.o $(TARGET_OBJ2ELF)
44b83271 2960 -rm -f $@
2a8a80e4 2961 $(TARGET_CC) $(test_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-test.o mod-test.o
2962 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
2963 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
44b83271 2964
e02ac02c 2965pre-test.o: $(test_mod_DEPENDENCIES) test_mod-commands_test.o
44b83271 2966 -rm -f $@
e02ac02c 2967 $(TARGET_CC) $(test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ test_mod-commands_test.o
44b83271 2968
2969mod-test.o: mod-test.c
b977bf01 2970 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(test_mod_CFLAGS) -c -o $@ $<
44b83271 2971
926b9823 2972mod-test.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
44b83271 2973 sh $(srcdir)/genmodsrc.sh 'test' $< > $@ || (rm -f $@; exit 1)
2974
83709125 2975ifneq ($(test_mod_EXPORTS),no)
44b83271 2976def-test.lst: pre-test.o
2977 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 test/' > $@
83709125 2978endif
44b83271 2979
2980und-test.lst: pre-test.o
2981 echo 'test' > $@
2982 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
2983
7d31f41f 2984test_mod-commands_test.o: commands/test.c $(commands/test.c_DEPENDENCIES)
46e5e5cb 2985 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(test_mod_CFLAGS) -MD -c -o $@ $<
44b83271 2986-include test_mod-commands_test.d
2987
228ffeab 2988CLEANFILES += cmd-test_mod-commands_test.lst fs-test_mod-commands_test.lst partmap-test_mod-commands_test.lst
44b83271 2989COMMANDFILES += cmd-test_mod-commands_test.lst
2990FSFILES += fs-test_mod-commands_test.lst
228ffeab 2991PARTMAPFILES += partmap-test_mod-commands_test.lst
44b83271 2992
7d31f41f 2993cmd-test_mod-commands_test.lst: commands/test.c $(commands/test.c_DEPENDENCIES) gencmdlist.sh
26c607b9 2994 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(test_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh test > $@ || (rm -f $@; exit 1)
44b83271 2995
7d31f41f 2996fs-test_mod-commands_test.lst: commands/test.c $(commands/test.c_DEPENDENCIES) genfslist.sh
26c607b9 2997 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(test_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh test > $@ || (rm -f $@; exit 1)
44b83271 2998
228ffeab 2999partmap-test_mod-commands_test.lst: commands/test.c $(commands/test.c_DEPENDENCIES) genpartmaplist.sh
3000 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(test_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh test > $@ || (rm -f $@; exit 1)
3001
44b83271 3002
233b1628 3003test_mod_CFLAGS = $(COMMON_CFLAGS)
3004test_mod_LDFLAGS = $(COMMON_LDFLAGS)
3005
3006# For loopback.mod
3007loopback_mod_SOURCES = disk/loopback.c
83709125 3008CLEANFILES += loopback.mod mod-loopback.o mod-loopback.c pre-loopback.o loopback_mod-disk_loopback.o und-loopback.lst
3009ifneq ($(loopback_mod_EXPORTS),no)
3010CLEANFILES += def-loopback.lst
233b1628 3011DEFSYMFILES += def-loopback.lst
83709125 3012endif
3013MOSTLYCLEANFILES += loopback_mod-disk_loopback.d
233b1628 3014UNDSYMFILES += und-loopback.lst
3015
2a8a80e4 3016loopback.mod: pre-loopback.o mod-loopback.o $(TARGET_OBJ2ELF)
233b1628 3017 -rm -f $@
2a8a80e4 3018 $(TARGET_CC) $(loopback_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-loopback.o mod-loopback.o
3019 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3020 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 3021
e02ac02c 3022pre-loopback.o: $(loopback_mod_DEPENDENCIES) loopback_mod-disk_loopback.o
233b1628 3023 -rm -f $@
e02ac02c 3024 $(TARGET_CC) $(loopback_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ loopback_mod-disk_loopback.o
233b1628 3025
3026mod-loopback.o: mod-loopback.c
b977bf01 3027 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loopback_mod_CFLAGS) -c -o $@ $<
233b1628 3028
926b9823 3029mod-loopback.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 3030 sh $(srcdir)/genmodsrc.sh 'loopback' $< > $@ || (rm -f $@; exit 1)
3031
83709125 3032ifneq ($(loopback_mod_EXPORTS),no)
233b1628 3033def-loopback.lst: pre-loopback.o
3034 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 loopback/' > $@
83709125 3035endif
233b1628 3036
3037und-loopback.lst: pre-loopback.o
3038 echo 'loopback' > $@
3039 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3040
7d31f41f 3041loopback_mod-disk_loopback.o: disk/loopback.c $(disk/loopback.c_DEPENDENCIES)
46e5e5cb 3042 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loopback_mod_CFLAGS) -MD -c -o $@ $<
233b1628 3043-include loopback_mod-disk_loopback.d
3044
228ffeab 3045CLEANFILES += cmd-loopback_mod-disk_loopback.lst fs-loopback_mod-disk_loopback.lst partmap-loopback_mod-disk_loopback.lst
233b1628 3046COMMANDFILES += cmd-loopback_mod-disk_loopback.lst
3047FSFILES += fs-loopback_mod-disk_loopback.lst
228ffeab 3048PARTMAPFILES += partmap-loopback_mod-disk_loopback.lst
233b1628 3049
7d31f41f 3050cmd-loopback_mod-disk_loopback.lst: disk/loopback.c $(disk/loopback.c_DEPENDENCIES) gencmdlist.sh
26c607b9 3051 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loopback_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh loopback > $@ || (rm -f $@; exit 1)
233b1628 3052
7d31f41f 3053fs-loopback_mod-disk_loopback.lst: disk/loopback.c $(disk/loopback.c_DEPENDENCIES) genfslist.sh
26c607b9 3054 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loopback_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh loopback > $@ || (rm -f $@; exit 1)
233b1628 3055
228ffeab 3056partmap-loopback_mod-disk_loopback.lst: disk/loopback.c $(disk/loopback.c_DEPENDENCIES) genpartmaplist.sh
3057 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loopback_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh loopback > $@ || (rm -f $@; exit 1)
3058
233b1628 3059
3060loopback_mod_CFLAGS = $(COMMON_CFLAGS)
3061loopback_mod_LDFLAGS = $(COMMON_LDFLAGS)
3062
aebe3d13 3063# For fs_uuid.mod
3064fs_uuid_mod_SOURCES = disk/fs_uuid.c
3065CLEANFILES += fs_uuid.mod mod-fs_uuid.o mod-fs_uuid.c pre-fs_uuid.o fs_uuid_mod-disk_fs_uuid.o und-fs_uuid.lst
3066ifneq ($(fs_uuid_mod_EXPORTS),no)
3067CLEANFILES += def-fs_uuid.lst
3068DEFSYMFILES += def-fs_uuid.lst
3069endif
3070MOSTLYCLEANFILES += fs_uuid_mod-disk_fs_uuid.d
3071UNDSYMFILES += und-fs_uuid.lst
3072
2a8a80e4 3073fs_uuid.mod: pre-fs_uuid.o mod-fs_uuid.o $(TARGET_OBJ2ELF)
aebe3d13 3074 -rm -f $@
2a8a80e4 3075 $(TARGET_CC) $(fs_uuid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-fs_uuid.o mod-fs_uuid.o
3076 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3077 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
aebe3d13 3078
3079pre-fs_uuid.o: $(fs_uuid_mod_DEPENDENCIES) fs_uuid_mod-disk_fs_uuid.o
3080 -rm -f $@
3081 $(TARGET_CC) $(fs_uuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ fs_uuid_mod-disk_fs_uuid.o
3082
3083mod-fs_uuid.o: mod-fs_uuid.c
3084 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fs_uuid_mod_CFLAGS) -c -o $@ $<
3085
926b9823 3086mod-fs_uuid.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
aebe3d13 3087 sh $(srcdir)/genmodsrc.sh 'fs_uuid' $< > $@ || (rm -f $@; exit 1)
3088
3089ifneq ($(fs_uuid_mod_EXPORTS),no)
3090def-fs_uuid.lst: pre-fs_uuid.o
3091 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 fs_uuid/' > $@
3092endif
3093
3094und-fs_uuid.lst: pre-fs_uuid.o
3095 echo 'fs_uuid' > $@
3096 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3097
3098fs_uuid_mod-disk_fs_uuid.o: disk/fs_uuid.c $(disk/fs_uuid.c_DEPENDENCIES)
3099 $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fs_uuid_mod_CFLAGS) -MD -c -o $@ $<
3100-include fs_uuid_mod-disk_fs_uuid.d
3101
3102CLEANFILES += cmd-fs_uuid_mod-disk_fs_uuid.lst fs-fs_uuid_mod-disk_fs_uuid.lst partmap-fs_uuid_mod-disk_fs_uuid.lst
3103COMMANDFILES += cmd-fs_uuid_mod-disk_fs_uuid.lst
3104FSFILES += fs-fs_uuid_mod-disk_fs_uuid.lst
3105PARTMAPFILES += partmap-fs_uuid_mod-disk_fs_uuid.lst
3106
3107cmd-fs_uuid_mod-disk_fs_uuid.lst: disk/fs_uuid.c $(disk/fs_uuid.c_DEPENDENCIES) gencmdlist.sh
3108 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fs_uuid_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh fs_uuid > $@ || (rm -f $@; exit 1)
3109
3110fs-fs_uuid_mod-disk_fs_uuid.lst: disk/fs_uuid.c $(disk/fs_uuid.c_DEPENDENCIES) genfslist.sh
3111 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fs_uuid_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh fs_uuid > $@ || (rm -f $@; exit 1)
3112
3113partmap-fs_uuid_mod-disk_fs_uuid.lst: disk/fs_uuid.c $(disk/fs_uuid.c_DEPENDENCIES) genpartmaplist.sh
3114 set -e; $(TARGET_CC) -Idisk -I$(srcdir)/disk $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(fs_uuid_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh fs_uuid > $@ || (rm -f $@; exit 1)
3115
3116
3117fs_uuid_mod_CFLAGS = $(COMMON_CFLAGS)
3118fs_uuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
3119
233b1628 3120# For configfile.mod
3121configfile_mod_SOURCES = commands/configfile.c
83709125 3122CLEANFILES += configfile.mod mod-configfile.o mod-configfile.c pre-configfile.o configfile_mod-commands_configfile.o und-configfile.lst
3123ifneq ($(configfile_mod_EXPORTS),no)
3124CLEANFILES += def-configfile.lst
233b1628 3125DEFSYMFILES += def-configfile.lst
83709125 3126endif
3127MOSTLYCLEANFILES += configfile_mod-commands_configfile.d
233b1628 3128UNDSYMFILES += und-configfile.lst
3129
2a8a80e4 3130configfile.mod: pre-configfile.o mod-configfile.o $(TARGET_OBJ2ELF)
233b1628 3131 -rm -f $@
2a8a80e4 3132 $(TARGET_CC) $(configfile_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-configfile.o mod-configfile.o
3133 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3134 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 3135
e02ac02c 3136pre-configfile.o: $(configfile_mod_DEPENDENCIES) configfile_mod-commands_configfile.o
233b1628 3137 -rm -f $@
e02ac02c 3138 $(TARGET_CC) $(configfile_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ configfile_mod-commands_configfile.o
233b1628 3139
3140mod-configfile.o: mod-configfile.c
b977bf01 3141 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(configfile_mod_CFLAGS) -c -o $@ $<
233b1628 3142
926b9823 3143mod-configfile.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 3144 sh $(srcdir)/genmodsrc.sh 'configfile' $< > $@ || (rm -f $@; exit 1)
3145
83709125 3146ifneq ($(configfile_mod_EXPORTS),no)
233b1628 3147def-configfile.lst: pre-configfile.o
3148 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 configfile/' > $@
83709125 3149endif
233b1628 3150
3151und-configfile.lst: pre-configfile.o
3152 echo 'configfile' > $@
3153 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3154
7d31f41f 3155configfile_mod-commands_configfile.o: commands/configfile.c $(commands/configfile.c_DEPENDENCIES)
46e5e5cb 3156 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(configfile_mod_CFLAGS) -MD -c -o $@ $<
233b1628 3157-include configfile_mod-commands_configfile.d
3158
228ffeab 3159CLEANFILES += cmd-configfile_mod-commands_configfile.lst fs-configfile_mod-commands_configfile.lst partmap-configfile_mod-commands_configfile.lst
233b1628 3160COMMANDFILES += cmd-configfile_mod-commands_configfile.lst
3161FSFILES += fs-configfile_mod-commands_configfile.lst
228ffeab 3162PARTMAPFILES += partmap-configfile_mod-commands_configfile.lst
233b1628 3163
7d31f41f 3164cmd-configfile_mod-commands_configfile.lst: commands/configfile.c $(commands/configfile.c_DEPENDENCIES) gencmdlist.sh
26c607b9 3165 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(configfile_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh configfile > $@ || (rm -f $@; exit 1)
233b1628 3166
7d31f41f 3167fs-configfile_mod-commands_configfile.lst: commands/configfile.c $(commands/configfile.c_DEPENDENCIES) genfslist.sh
26c607b9 3168 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(configfile_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh configfile > $@ || (rm -f $@; exit 1)
233b1628 3169
228ffeab 3170partmap-configfile_mod-commands_configfile.lst: commands/configfile.c $(commands/configfile.c_DEPENDENCIES) genpartmaplist.sh
3171 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(configfile_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh configfile > $@ || (rm -f $@; exit 1)
3172
233b1628 3173
3174configfile_mod_CFLAGS = $(COMMON_CFLAGS)
3175configfile_mod_LDFLAGS = $(COMMON_LDFLAGS)
3176
3177# For terminfo.mod.
3178terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
83709125 3179CLEANFILES += terminfo.mod mod-terminfo.o mod-terminfo.c pre-terminfo.o terminfo_mod-term_terminfo.o terminfo_mod-term_tparm.o und-terminfo.lst
3180ifneq ($(terminfo_mod_EXPORTS),no)
3181CLEANFILES += def-terminfo.lst
233b1628 3182DEFSYMFILES += def-terminfo.lst
83709125 3183endif
3184MOSTLYCLEANFILES += terminfo_mod-term_terminfo.d terminfo_mod-term_tparm.d
233b1628 3185UNDSYMFILES += und-terminfo.lst
3186
2a8a80e4 3187terminfo.mod: pre-terminfo.o mod-terminfo.o $(TARGET_OBJ2ELF)
233b1628 3188 -rm -f $@
2a8a80e4 3189 $(TARGET_CC) $(terminfo_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-terminfo.o mod-terminfo.o
3190 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3191 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 3192
e02ac02c 3193pre-terminfo.o: $(terminfo_mod_DEPENDENCIES) terminfo_mod-term_terminfo.o terminfo_mod-term_tparm.o
233b1628 3194 -rm -f $@
e02ac02c 3195 $(TARGET_CC) $(terminfo_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ terminfo_mod-term_terminfo.o terminfo_mod-term_tparm.o
233b1628 3196
3197mod-terminfo.o: mod-terminfo.c
b977bf01 3198 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -c -o $@ $<
233b1628 3199
926b9823 3200mod-terminfo.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 3201 sh $(srcdir)/genmodsrc.sh 'terminfo' $< > $@ || (rm -f $@; exit 1)
3202
83709125 3203ifneq ($(terminfo_mod_EXPORTS),no)
233b1628 3204def-terminfo.lst: pre-terminfo.o
3205 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 terminfo/' > $@
83709125 3206endif
233b1628 3207
3208und-terminfo.lst: pre-terminfo.o
3209 echo 'terminfo' > $@
3210 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3211
7d31f41f 3212terminfo_mod-term_terminfo.o: term/terminfo.c $(term/terminfo.c_DEPENDENCIES)
46e5e5cb 3213 $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -MD -c -o $@ $<
233b1628 3214-include terminfo_mod-term_terminfo.d
3215
228ffeab 3216CLEANFILES += cmd-terminfo_mod-term_terminfo.lst fs-terminfo_mod-term_terminfo.lst partmap-terminfo_mod-term_terminfo.lst
233b1628 3217COMMANDFILES += cmd-terminfo_mod-term_terminfo.lst
3218FSFILES += fs-terminfo_mod-term_terminfo.lst
228ffeab 3219PARTMAPFILES += partmap-terminfo_mod-term_terminfo.lst
233b1628 3220
7d31f41f 3221cmd-terminfo_mod-term_terminfo.lst: term/terminfo.c $(term/terminfo.c_DEPENDENCIES) gencmdlist.sh
26c607b9 3222 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh terminfo > $@ || (rm -f $@; exit 1)
233b1628 3223
7d31f41f 3224fs-terminfo_mod-term_terminfo.lst: term/terminfo.c $(term/terminfo.c_DEPENDENCIES) genfslist.sh
26c607b9 3225 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh terminfo > $@ || (rm -f $@; exit 1)
233b1628 3226
228ffeab 3227partmap-terminfo_mod-term_terminfo.lst: term/terminfo.c $(term/terminfo.c_DEPENDENCIES) genpartmaplist.sh
3228 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh terminfo > $@ || (rm -f $@; exit 1)
3229
233b1628 3230
7d31f41f 3231terminfo_mod-term_tparm.o: term/tparm.c $(term/tparm.c_DEPENDENCIES)
46e5e5cb 3232 $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -MD -c -o $@ $<
233b1628 3233-include terminfo_mod-term_tparm.d
3234
228ffeab 3235CLEANFILES += cmd-terminfo_mod-term_tparm.lst fs-terminfo_mod-term_tparm.lst partmap-terminfo_mod-term_tparm.lst
233b1628 3236COMMANDFILES += cmd-terminfo_mod-term_tparm.lst
3237FSFILES += fs-terminfo_mod-term_tparm.lst
228ffeab 3238PARTMAPFILES += partmap-terminfo_mod-term_tparm.lst
233b1628 3239
7d31f41f 3240cmd-terminfo_mod-term_tparm.lst: term/tparm.c $(term/tparm.c_DEPENDENCIES) gencmdlist.sh
26c607b9 3241 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh terminfo > $@ || (rm -f $@; exit 1)
233b1628 3242
7d31f41f 3243fs-terminfo_mod-term_tparm.lst: term/tparm.c $(term/tparm.c_DEPENDENCIES) genfslist.sh
26c607b9 3244 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh terminfo > $@ || (rm -f $@; exit 1)
233b1628 3245
228ffeab 3246partmap-terminfo_mod-term_tparm.lst: term/tparm.c $(term/tparm.c_DEPENDENCIES) genpartmaplist.sh
3247 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(terminfo_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh terminfo > $@ || (rm -f $@; exit 1)
3248
233b1628 3249
3250terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
3251terminfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
3252
89a7d726 3253# For blocklist.mod.
3254blocklist_mod_SOURCES = commands/blocklist.c
3255CLEANFILES += blocklist.mod mod-blocklist.o mod-blocklist.c pre-blocklist.o blocklist_mod-commands_blocklist.o und-blocklist.lst
3256ifneq ($(blocklist_mod_EXPORTS),no)
3257CLEANFILES += def-blocklist.lst
3258DEFSYMFILES += def-blocklist.lst
3259endif
3260MOSTLYCLEANFILES += blocklist_mod-commands_blocklist.d
3261UNDSYMFILES += und-blocklist.lst
3262
2a8a80e4 3263blocklist.mod: pre-blocklist.o mod-blocklist.o $(TARGET_OBJ2ELF)
89a7d726 3264 -rm -f $@
2a8a80e4 3265 $(TARGET_CC) $(blocklist_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-blocklist.o mod-blocklist.o
3266 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3267 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
89a7d726 3268
e02ac02c 3269pre-blocklist.o: $(blocklist_mod_DEPENDENCIES) blocklist_mod-commands_blocklist.o
89a7d726 3270 -rm -f $@
e02ac02c 3271 $(TARGET_CC) $(blocklist_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ blocklist_mod-commands_blocklist.o
89a7d726 3272
3273mod-blocklist.o: mod-blocklist.c
b977bf01 3274 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(blocklist_mod_CFLAGS) -c -o $@ $<
89a7d726 3275
926b9823 3276mod-blocklist.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
89a7d726 3277 sh $(srcdir)/genmodsrc.sh 'blocklist' $< > $@ || (rm -f $@; exit 1)
3278
3279ifneq ($(blocklist_mod_EXPORTS),no)
3280def-blocklist.lst: pre-blocklist.o
3281 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 blocklist/' > $@
3282endif
3283
3284und-blocklist.lst: pre-blocklist.o
3285 echo 'blocklist' > $@
3286 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3287
7d31f41f 3288blocklist_mod-commands_blocklist.o: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES)
46e5e5cb 3289 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(blocklist_mod_CFLAGS) -MD -c -o $@ $<
89a7d726 3290-include blocklist_mod-commands_blocklist.d
3291
228ffeab 3292CLEANFILES += cmd-blocklist_mod-commands_blocklist.lst fs-blocklist_mod-commands_blocklist.lst partmap-blocklist_mod-commands_blocklist.lst
89a7d726 3293COMMANDFILES += cmd-blocklist_mod-commands_blocklist.lst
3294FSFILES += fs-blocklist_mod-commands_blocklist.lst
228ffeab 3295PARTMAPFILES += partmap-blocklist_mod-commands_blocklist.lst
89a7d726 3296
7d31f41f 3297cmd-blocklist_mod-commands_blocklist.lst: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES) gencmdlist.sh
26c607b9 3298 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(blocklist_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh blocklist > $@ || (rm -f $@; exit 1)
89a7d726 3299
7d31f41f 3300fs-blocklist_mod-commands_blocklist.lst: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES) genfslist.sh
26c607b9 3301 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(blocklist_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh blocklist > $@ || (rm -f $@; exit 1)
89a7d726 3302
228ffeab 3303partmap-blocklist_mod-commands_blocklist.lst: commands/blocklist.c $(commands/blocklist.c_DEPENDENCIES) genpartmaplist.sh
3304 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(blocklist_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh blocklist > $@ || (rm -f $@; exit 1)
3305
89a7d726 3306
3307blocklist_mod_CFLAGS = $(COMMON_CFLAGS)
3308blocklist_mod_LDFLAGS = $(COMMON_LDFLAGS)
233b1628 3309
c405c391 3310# For hexdump.mod.
a85cd5a0 3311hexdump_mod_SOURCES = commands/hexdump.c lib/hexdump.c
3312CLEANFILES += hexdump.mod mod-hexdump.o mod-hexdump.c pre-hexdump.o hexdump_mod-commands_hexdump.o hexdump_mod-lib_hexdump.o und-hexdump.lst
c405c391 3313ifneq ($(hexdump_mod_EXPORTS),no)
3314CLEANFILES += def-hexdump.lst
3315DEFSYMFILES += def-hexdump.lst
3316endif
a85cd5a0 3317MOSTLYCLEANFILES += hexdump_mod-commands_hexdump.d hexdump_mod-lib_hexdump.d
c405c391 3318UNDSYMFILES += und-hexdump.lst
3319
2a8a80e4 3320hexdump.mod: pre-hexdump.o mod-hexdump.o $(TARGET_OBJ2ELF)
c405c391 3321 -rm -f $@
2a8a80e4 3322 $(TARGET_CC) $(hexdump_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-hexdump.o mod-hexdump.o
3323 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3324 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
c405c391 3325
a85cd5a0 3326pre-hexdump.o: $(hexdump_mod_DEPENDENCIES) hexdump_mod-commands_hexdump.o hexdump_mod-lib_hexdump.o
c405c391 3327 -rm -f $@
a85cd5a0 3328 $(TARGET_CC) $(hexdump_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ hexdump_mod-commands_hexdump.o hexdump_mod-lib_hexdump.o
c405c391 3329
3330mod-hexdump.o: mod-hexdump.c
3331 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -c -o $@ $<
3332
926b9823 3333mod-hexdump.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
c405c391 3334 sh $(srcdir)/genmodsrc.sh 'hexdump' $< > $@ || (rm -f $@; exit 1)
3335
3336ifneq ($(hexdump_mod_EXPORTS),no)
3337def-hexdump.lst: pre-hexdump.o
3338 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hexdump/' > $@
3339endif
3340
3341und-hexdump.lst: pre-hexdump.o
3342 echo 'hexdump' > $@
3343 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3344
7d31f41f 3345hexdump_mod-commands_hexdump.o: commands/hexdump.c $(commands/hexdump.c_DEPENDENCIES)
c405c391 3346 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -MD -c -o $@ $<
3347-include hexdump_mod-commands_hexdump.d
3348
228ffeab 3349CLEANFILES += cmd-hexdump_mod-commands_hexdump.lst fs-hexdump_mod-commands_hexdump.lst partmap-hexdump_mod-commands_hexdump.lst
c405c391 3350COMMANDFILES += cmd-hexdump_mod-commands_hexdump.lst
3351FSFILES += fs-hexdump_mod-commands_hexdump.lst
228ffeab 3352PARTMAPFILES += partmap-hexdump_mod-commands_hexdump.lst
c405c391 3353
7d31f41f 3354cmd-hexdump_mod-commands_hexdump.lst: commands/hexdump.c $(commands/hexdump.c_DEPENDENCIES) gencmdlist.sh
c405c391 3355 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh hexdump > $@ || (rm -f $@; exit 1)
3356
7d31f41f 3357fs-hexdump_mod-commands_hexdump.lst: commands/hexdump.c $(commands/hexdump.c_DEPENDENCIES) genfslist.sh
c405c391 3358 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh hexdump > $@ || (rm -f $@; exit 1)
3359
228ffeab 3360partmap-hexdump_mod-commands_hexdump.lst: commands/hexdump.c $(commands/hexdump.c_DEPENDENCIES) genpartmaplist.sh
3361 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh hexdump > $@ || (rm -f $@; exit 1)
3362
c405c391 3363
a85cd5a0 3364hexdump_mod-lib_hexdump.o: lib/hexdump.c $(lib/hexdump.c_DEPENDENCIES)
3365 $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -MD -c -o $@ $<
3366-include hexdump_mod-lib_hexdump.d
3367
3368CLEANFILES += cmd-hexdump_mod-lib_hexdump.lst fs-hexdump_mod-lib_hexdump.lst partmap-hexdump_mod-lib_hexdump.lst
3369COMMANDFILES += cmd-hexdump_mod-lib_hexdump.lst
3370FSFILES += fs-hexdump_mod-lib_hexdump.lst
3371PARTMAPFILES += partmap-hexdump_mod-lib_hexdump.lst
3372
3373cmd-hexdump_mod-lib_hexdump.lst: lib/hexdump.c $(lib/hexdump.c_DEPENDENCIES) gencmdlist.sh
3374 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh hexdump > $@ || (rm -f $@; exit 1)
3375
3376fs-hexdump_mod-lib_hexdump.lst: lib/hexdump.c $(lib/hexdump.c_DEPENDENCIES) genfslist.sh
3377 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh hexdump > $@ || (rm -f $@; exit 1)
3378
3379partmap-hexdump_mod-lib_hexdump.lst: lib/hexdump.c $(lib/hexdump.c_DEPENDENCIES) genpartmaplist.sh
3380 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(hexdump_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh hexdump > $@ || (rm -f $@; exit 1)
3381
3382
c405c391 3383hexdump_mod_CFLAGS = $(COMMON_CFLAGS)
3384hexdump_mod_LDFLAGS = $(COMMON_LDFLAGS)
3385
2270f77b 3386# For read.mod.
3387read_mod_SOURCES = commands/read.c
3388CLEANFILES += read.mod mod-read.o mod-read.c pre-read.o read_mod-commands_read.o und-read.lst
3389ifneq ($(read_mod_EXPORTS),no)
3390CLEANFILES += def-read.lst
3391DEFSYMFILES += def-read.lst
3392endif
3393MOSTLYCLEANFILES += read_mod-commands_read.d
3394UNDSYMFILES += und-read.lst
3395
2a8a80e4 3396read.mod: pre-read.o mod-read.o $(TARGET_OBJ2ELF)
2270f77b 3397 -rm -f $@
2a8a80e4 3398 $(TARGET_CC) $(read_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-read.o mod-read.o
3399 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3400 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2270f77b 3401
3402pre-read.o: $(read_mod_DEPENDENCIES) read_mod-commands_read.o
3403 -rm -f $@
3404 $(TARGET_CC) $(read_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ read_mod-commands_read.o
3405
3406mod-read.o: mod-read.c
3407 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(read_mod_CFLAGS) -c -o $@ $<
3408
926b9823 3409mod-read.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2270f77b 3410 sh $(srcdir)/genmodsrc.sh 'read' $< > $@ || (rm -f $@; exit 1)
3411
3412ifneq ($(read_mod_EXPORTS),no)
3413def-read.lst: pre-read.o
3414 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 read/' > $@
3415endif
3416
3417und-read.lst: pre-read.o
3418 echo 'read' > $@
3419 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3420
3421read_mod-commands_read.o: commands/read.c $(commands/read.c_DEPENDENCIES)
3422 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(read_mod_CFLAGS) -MD -c -o $@ $<
3423-include read_mod-commands_read.d
3424
3425CLEANFILES += cmd-read_mod-commands_read.lst fs-read_mod-commands_read.lst partmap-read_mod-commands_read.lst
3426COMMANDFILES += cmd-read_mod-commands_read.lst
3427FSFILES += fs-read_mod-commands_read.lst
3428PARTMAPFILES += partmap-read_mod-commands_read.lst
3429
3430cmd-read_mod-commands_read.lst: commands/read.c $(commands/read.c_DEPENDENCIES) gencmdlist.sh
3431 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(read_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh read > $@ || (rm -f $@; exit 1)
3432
3433fs-read_mod-commands_read.lst: commands/read.c $(commands/read.c_DEPENDENCIES) genfslist.sh
3434 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(read_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh read > $@ || (rm -f $@; exit 1)
3435
3436partmap-read_mod-commands_read.lst: commands/read.c $(commands/read.c_DEPENDENCIES) genpartmaplist.sh
3437 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(read_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh read > $@ || (rm -f $@; exit 1)
3438
3439
3440read_mod_CFLAGS = $(COMMON_CFLAGS)
3441read_mod_LDFLAGS = $(COMMON_LDFLAGS)
3442
3443# For sleep.mod.
3444sleep_mod_SOURCES = commands/sleep.c
3445CLEANFILES += sleep.mod mod-sleep.o mod-sleep.c pre-sleep.o sleep_mod-commands_sleep.o und-sleep.lst
3446ifneq ($(sleep_mod_EXPORTS),no)
3447CLEANFILES += def-sleep.lst
3448DEFSYMFILES += def-sleep.lst
3449endif
3450MOSTLYCLEANFILES += sleep_mod-commands_sleep.d
3451UNDSYMFILES += und-sleep.lst
3452
2a8a80e4 3453sleep.mod: pre-sleep.o mod-sleep.o $(TARGET_OBJ2ELF)
2270f77b 3454 -rm -f $@
2a8a80e4 3455 $(TARGET_CC) $(sleep_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-sleep.o mod-sleep.o
3456 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3457 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2270f77b 3458
3459pre-sleep.o: $(sleep_mod_DEPENDENCIES) sleep_mod-commands_sleep.o
3460 -rm -f $@
3461 $(TARGET_CC) $(sleep_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ sleep_mod-commands_sleep.o
3462
3463mod-sleep.o: mod-sleep.c
3464 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sleep_mod_CFLAGS) -c -o $@ $<
3465
926b9823 3466mod-sleep.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2270f77b 3467 sh $(srcdir)/genmodsrc.sh 'sleep' $< > $@ || (rm -f $@; exit 1)
3468
3469ifneq ($(sleep_mod_EXPORTS),no)
3470def-sleep.lst: pre-sleep.o
3471 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 sleep/' > $@
3472endif
3473
3474und-sleep.lst: pre-sleep.o
3475 echo 'sleep' > $@
3476 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3477
3478sleep_mod-commands_sleep.o: commands/sleep.c $(commands/sleep.c_DEPENDENCIES)
3479 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sleep_mod_CFLAGS) -MD -c -o $@ $<
3480-include sleep_mod-commands_sleep.d
3481
3482CLEANFILES += cmd-sleep_mod-commands_sleep.lst fs-sleep_mod-commands_sleep.lst partmap-sleep_mod-commands_sleep.lst
3483COMMANDFILES += cmd-sleep_mod-commands_sleep.lst
3484FSFILES += fs-sleep_mod-commands_sleep.lst
3485PARTMAPFILES += partmap-sleep_mod-commands_sleep.lst
3486
3487cmd-sleep_mod-commands_sleep.lst: commands/sleep.c $(commands/sleep.c_DEPENDENCIES) gencmdlist.sh
3488 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sleep_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh sleep > $@ || (rm -f $@; exit 1)
3489
3490fs-sleep_mod-commands_sleep.lst: commands/sleep.c $(commands/sleep.c_DEPENDENCIES) genfslist.sh
3491 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sleep_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh sleep > $@ || (rm -f $@; exit 1)
3492
3493partmap-sleep_mod-commands_sleep.lst: commands/sleep.c $(commands/sleep.c_DEPENDENCIES) genpartmaplist.sh
3494 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(sleep_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh sleep > $@ || (rm -f $@; exit 1)
3495
3496
3497sleep_mod_CFLAGS = $(COMMON_CFLAGS)
3498sleep_mod_LDFLAGS = $(COMMON_LDFLAGS)
3499
3500# For loadenv.mod.
a85cd5a0 3501loadenv_mod_SOURCES = commands/loadenv.c lib/envblk.c
3502CLEANFILES += loadenv.mod mod-loadenv.o mod-loadenv.c pre-loadenv.o loadenv_mod-commands_loadenv.o loadenv_mod-lib_envblk.o und-loadenv.lst
2270f77b 3503ifneq ($(loadenv_mod_EXPORTS),no)
3504CLEANFILES += def-loadenv.lst
3505DEFSYMFILES += def-loadenv.lst
3506endif
a85cd5a0 3507MOSTLYCLEANFILES += loadenv_mod-commands_loadenv.d loadenv_mod-lib_envblk.d
2270f77b 3508UNDSYMFILES += und-loadenv.lst
3509
2a8a80e4 3510loadenv.mod: pre-loadenv.o mod-loadenv.o $(TARGET_OBJ2ELF)
2270f77b 3511 -rm -f $@
2a8a80e4 3512 $(TARGET_CC) $(loadenv_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-loadenv.o mod-loadenv.o
3513 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3514 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2270f77b 3515
a85cd5a0 3516pre-loadenv.o: $(loadenv_mod_DEPENDENCIES) loadenv_mod-commands_loadenv.o loadenv_mod-lib_envblk.o
2270f77b 3517 -rm -f $@
a85cd5a0 3518 $(TARGET_CC) $(loadenv_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ loadenv_mod-commands_loadenv.o loadenv_mod-lib_envblk.o
2270f77b 3519
3520mod-loadenv.o: mod-loadenv.c
3521 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -c -o $@ $<
3522
926b9823 3523mod-loadenv.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2270f77b 3524 sh $(srcdir)/genmodsrc.sh 'loadenv' $< > $@ || (rm -f $@; exit 1)
3525
3526ifneq ($(loadenv_mod_EXPORTS),no)
3527def-loadenv.lst: pre-loadenv.o
3528 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 loadenv/' > $@
3529endif
3530
3531und-loadenv.lst: pre-loadenv.o
3532 echo 'loadenv' > $@
3533 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3534
3535loadenv_mod-commands_loadenv.o: commands/loadenv.c $(commands/loadenv.c_DEPENDENCIES)
3536 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -MD -c -o $@ $<
3537-include loadenv_mod-commands_loadenv.d
3538
3539CLEANFILES += cmd-loadenv_mod-commands_loadenv.lst fs-loadenv_mod-commands_loadenv.lst partmap-loadenv_mod-commands_loadenv.lst
3540COMMANDFILES += cmd-loadenv_mod-commands_loadenv.lst
3541FSFILES += fs-loadenv_mod-commands_loadenv.lst
3542PARTMAPFILES += partmap-loadenv_mod-commands_loadenv.lst
3543
3544cmd-loadenv_mod-commands_loadenv.lst: commands/loadenv.c $(commands/loadenv.c_DEPENDENCIES) gencmdlist.sh
3545 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh loadenv > $@ || (rm -f $@; exit 1)
3546
3547fs-loadenv_mod-commands_loadenv.lst: commands/loadenv.c $(commands/loadenv.c_DEPENDENCIES) genfslist.sh
3548 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh loadenv > $@ || (rm -f $@; exit 1)
3549
3550partmap-loadenv_mod-commands_loadenv.lst: commands/loadenv.c $(commands/loadenv.c_DEPENDENCIES) genpartmaplist.sh
3551 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh loadenv > $@ || (rm -f $@; exit 1)
3552
3553
a85cd5a0 3554loadenv_mod-lib_envblk.o: lib/envblk.c $(lib/envblk.c_DEPENDENCIES)
3555 $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -MD -c -o $@ $<
3556-include loadenv_mod-lib_envblk.d
2270f77b 3557
a85cd5a0 3558CLEANFILES += cmd-loadenv_mod-lib_envblk.lst fs-loadenv_mod-lib_envblk.lst partmap-loadenv_mod-lib_envblk.lst
3559COMMANDFILES += cmd-loadenv_mod-lib_envblk.lst
3560FSFILES += fs-loadenv_mod-lib_envblk.lst
3561PARTMAPFILES += partmap-loadenv_mod-lib_envblk.lst
2270f77b 3562
a85cd5a0 3563cmd-loadenv_mod-lib_envblk.lst: lib/envblk.c $(lib/envblk.c_DEPENDENCIES) gencmdlist.sh
3564 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh loadenv > $@ || (rm -f $@; exit 1)
2270f77b 3565
a85cd5a0 3566fs-loadenv_mod-lib_envblk.lst: lib/envblk.c $(lib/envblk.c_DEPENDENCIES) genfslist.sh
3567 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh loadenv > $@ || (rm -f $@; exit 1)
2270f77b 3568
a85cd5a0 3569partmap-loadenv_mod-lib_envblk.lst: lib/envblk.c $(lib/envblk.c_DEPENDENCIES) genpartmaplist.sh
3570 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(loadenv_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh loadenv > $@ || (rm -f $@; exit 1)
2270f77b 3571
3572
3573loadenv_mod_CFLAGS = $(COMMON_CFLAGS)
3574loadenv_mod_LDFLAGS = $(COMMON_LDFLAGS)
3575
a85cd5a0 3576# For crc.mod.
3577crc_mod_SOURCES = commands/crc.c lib/crc.c
3578CLEANFILES += crc.mod mod-crc.o mod-crc.c pre-crc.o crc_mod-commands_crc.o crc_mod-lib_crc.o und-crc.lst
3579ifneq ($(crc_mod_EXPORTS),no)
3580CLEANFILES += def-crc.lst
3581DEFSYMFILES += def-crc.lst
3582endif
3583MOSTLYCLEANFILES += crc_mod-commands_crc.d crc_mod-lib_crc.d
3584UNDSYMFILES += und-crc.lst
3585
3586crc.mod: pre-crc.o mod-crc.o $(TARGET_OBJ2ELF)
3587 -rm -f $@
3588 $(TARGET_CC) $(crc_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-crc.o mod-crc.o
3589 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3590 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3591
3592pre-crc.o: $(crc_mod_DEPENDENCIES) crc_mod-commands_crc.o crc_mod-lib_crc.o
3593 -rm -f $@
3594 $(TARGET_CC) $(crc_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ crc_mod-commands_crc.o crc_mod-lib_crc.o
3595
3596mod-crc.o: mod-crc.c
3597 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -c -o $@ $<
3598
926b9823 3599mod-crc.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
a85cd5a0 3600 sh $(srcdir)/genmodsrc.sh 'crc' $< > $@ || (rm -f $@; exit 1)
3601
3602ifneq ($(crc_mod_EXPORTS),no)
3603def-crc.lst: pre-crc.o
3604 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 crc/' > $@
3605endif
3606
3607und-crc.lst: pre-crc.o
3608 echo 'crc' > $@
3609 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3610
3611crc_mod-commands_crc.o: commands/crc.c $(commands/crc.c_DEPENDENCIES)
3612 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -MD -c -o $@ $<
3613-include crc_mod-commands_crc.d
3614
3615CLEANFILES += cmd-crc_mod-commands_crc.lst fs-crc_mod-commands_crc.lst partmap-crc_mod-commands_crc.lst
3616COMMANDFILES += cmd-crc_mod-commands_crc.lst
3617FSFILES += fs-crc_mod-commands_crc.lst
3618PARTMAPFILES += partmap-crc_mod-commands_crc.lst
3619
3620cmd-crc_mod-commands_crc.lst: commands/crc.c $(commands/crc.c_DEPENDENCIES) gencmdlist.sh
3621 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh crc > $@ || (rm -f $@; exit 1)
3622
3623fs-crc_mod-commands_crc.lst: commands/crc.c $(commands/crc.c_DEPENDENCIES) genfslist.sh
3624 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh crc > $@ || (rm -f $@; exit 1)
3625
3626partmap-crc_mod-commands_crc.lst: commands/crc.c $(commands/crc.c_DEPENDENCIES) genpartmaplist.sh
3627 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh crc > $@ || (rm -f $@; exit 1)
3628
3629
3630crc_mod-lib_crc.o: lib/crc.c $(lib/crc.c_DEPENDENCIES)
3631 $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -MD -c -o $@ $<
3632-include crc_mod-lib_crc.d
3633
3634CLEANFILES += cmd-crc_mod-lib_crc.lst fs-crc_mod-lib_crc.lst partmap-crc_mod-lib_crc.lst
3635COMMANDFILES += cmd-crc_mod-lib_crc.lst
3636FSFILES += fs-crc_mod-lib_crc.lst
3637PARTMAPFILES += partmap-crc_mod-lib_crc.lst
3638
3639cmd-crc_mod-lib_crc.lst: lib/crc.c $(lib/crc.c_DEPENDENCIES) gencmdlist.sh
3640 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh crc > $@ || (rm -f $@; exit 1)
3641
3642fs-crc_mod-lib_crc.lst: lib/crc.c $(lib/crc.c_DEPENDENCIES) genfslist.sh
3643 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh crc > $@ || (rm -f $@; exit 1)
3644
3645partmap-crc_mod-lib_crc.lst: lib/crc.c $(lib/crc.c_DEPENDENCIES) genpartmaplist.sh
3646 set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(crc_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh crc > $@ || (rm -f $@; exit 1)
3647
3648
3649crc_mod_CFLAGS = $(COMMON_CFLAGS)
3650crc_mod_LDFLAGS = $(COMMON_LDFLAGS)
3651
d098b090 3652# Common Video Subsystem specific modules.
3653pkglib_MODULES += video.mod videotest.mod bitmap.mod tga.mod jpeg.mod \
3654 png.mod font.mod gfxterm.mod
3655
3656# For video.mod.
3657video_mod_SOURCES = video/video.c
3658CLEANFILES += video.mod mod-video.o mod-video.c pre-video.o video_mod-video_video.o und-video.lst
3659ifneq ($(video_mod_EXPORTS),no)
3660CLEANFILES += def-video.lst
3661DEFSYMFILES += def-video.lst
7f02114b 3662endif
d098b090 3663MOSTLYCLEANFILES += video_mod-video_video.d
3664UNDSYMFILES += und-video.lst
7f02114b 3665
d098b090 3666video.mod: pre-video.o mod-video.o $(TARGET_OBJ2ELF)
7f02114b 3667 -rm -f $@
d098b090 3668 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-video.o mod-video.o
7f02114b 3669 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3670 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3671
d098b090 3672pre-video.o: $(video_mod_DEPENDENCIES) video_mod-video_video.o
7f02114b 3673 -rm -f $@
d098b090 3674 $(TARGET_CC) $(video_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ video_mod-video_video.o
7f02114b 3675
d098b090 3676mod-video.o: mod-video.c
3677 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -c -o $@ $<
7f02114b 3678
d098b090 3679mod-video.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3680 sh $(srcdir)/genmodsrc.sh 'video' $< > $@ || (rm -f $@; exit 1)
7f02114b 3681
d098b090 3682ifneq ($(video_mod_EXPORTS),no)
3683def-video.lst: pre-video.o
3684 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 video/' > $@
7f02114b 3685endif
3686
d098b090 3687und-video.lst: pre-video.o
3688 echo 'video' > $@
7f02114b 3689 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3690
d098b090 3691video_mod-video_video.o: video/video.c $(video/video.c_DEPENDENCIES)
3692 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -MD -c -o $@ $<
3693-include video_mod-video_video.d
7f02114b 3694
d098b090 3695CLEANFILES += cmd-video_mod-video_video.lst fs-video_mod-video_video.lst partmap-video_mod-video_video.lst
3696COMMANDFILES += cmd-video_mod-video_video.lst
3697FSFILES += fs-video_mod-video_video.lst
3698PARTMAPFILES += partmap-video_mod-video_video.lst
7f02114b 3699
d098b090 3700cmd-video_mod-video_video.lst: video/video.c $(video/video.c_DEPENDENCIES) gencmdlist.sh
3701 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)
7f02114b 3702
d098b090 3703fs-video_mod-video_video.lst: video/video.c $(video/video.c_DEPENDENCIES) genfslist.sh
3704 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)
7f02114b 3705
d098b090 3706partmap-video_mod-video_video.lst: video/video.c $(video/video.c_DEPENDENCIES) genpartmaplist.sh
3707 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(video_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh video > $@ || (rm -f $@; exit 1)
7f02114b 3708
3709
d098b090 3710video_mod_CFLAGS = $(COMMON_CFLAGS)
3711video_mod_LDFLAGS = $(COMMON_LDFLAGS)
7f02114b 3712
3713# For videotest.mod.
3714videotest_mod_SOURCES = commands/videotest.c
3715CLEANFILES += videotest.mod mod-videotest.o mod-videotest.c pre-videotest.o videotest_mod-commands_videotest.o und-videotest.lst
3716ifneq ($(videotest_mod_EXPORTS),no)
3717CLEANFILES += def-videotest.lst
3718DEFSYMFILES += def-videotest.lst
3719endif
3720MOSTLYCLEANFILES += videotest_mod-commands_videotest.d
3721UNDSYMFILES += und-videotest.lst
3722
3723videotest.mod: pre-videotest.o mod-videotest.o $(TARGET_OBJ2ELF)
3724 -rm -f $@
3725 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-videotest.o mod-videotest.o
3726 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3727 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3728
3729pre-videotest.o: $(videotest_mod_DEPENDENCIES) videotest_mod-commands_videotest.o
3730 -rm -f $@
3731 $(TARGET_CC) $(videotest_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ videotest_mod-commands_videotest.o
3732
3733mod-videotest.o: mod-videotest.c
3734 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -c -o $@ $<
3735
3736mod-videotest.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3737 sh $(srcdir)/genmodsrc.sh 'videotest' $< > $@ || (rm -f $@; exit 1)
3738
3739ifneq ($(videotest_mod_EXPORTS),no)
3740def-videotest.lst: pre-videotest.o
3741 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 videotest/' > $@
3742endif
3743
3744und-videotest.lst: pre-videotest.o
3745 echo 'videotest' > $@
3746 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3747
3748videotest_mod-commands_videotest.o: commands/videotest.c $(commands/videotest.c_DEPENDENCIES)
3749 $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -MD -c -o $@ $<
3750-include videotest_mod-commands_videotest.d
3751
3752CLEANFILES += cmd-videotest_mod-commands_videotest.lst fs-videotest_mod-commands_videotest.lst partmap-videotest_mod-commands_videotest.lst
3753COMMANDFILES += cmd-videotest_mod-commands_videotest.lst
3754FSFILES += fs-videotest_mod-commands_videotest.lst
3755PARTMAPFILES += partmap-videotest_mod-commands_videotest.lst
3756
3757cmd-videotest_mod-commands_videotest.lst: commands/videotest.c $(commands/videotest.c_DEPENDENCIES) gencmdlist.sh
3758 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)
3759
3760fs-videotest_mod-commands_videotest.lst: commands/videotest.c $(commands/videotest.c_DEPENDENCIES) genfslist.sh
3761 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)
3762
3763partmap-videotest_mod-commands_videotest.lst: commands/videotest.c $(commands/videotest.c_DEPENDENCIES) genpartmaplist.sh
3764 set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(videotest_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh videotest > $@ || (rm -f $@; exit 1)
3765
3766
3767videotest_mod_CFLAGS = $(COMMON_CFLAGS)
3768videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
3769
3770# For bitmap.mod
3771bitmap_mod_SOURCES = video/bitmap.c
3772CLEANFILES += bitmap.mod mod-bitmap.o mod-bitmap.c pre-bitmap.o bitmap_mod-video_bitmap.o und-bitmap.lst
3773ifneq ($(bitmap_mod_EXPORTS),no)
3774CLEANFILES += def-bitmap.lst
3775DEFSYMFILES += def-bitmap.lst
3776endif
3777MOSTLYCLEANFILES += bitmap_mod-video_bitmap.d
3778UNDSYMFILES += und-bitmap.lst
3779
3780bitmap.mod: pre-bitmap.o mod-bitmap.o $(TARGET_OBJ2ELF)
3781 -rm -f $@
3782 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-bitmap.o mod-bitmap.o
3783 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3784 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3785
3786pre-bitmap.o: $(bitmap_mod_DEPENDENCIES) bitmap_mod-video_bitmap.o
3787 -rm -f $@
3788 $(TARGET_CC) $(bitmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ bitmap_mod-video_bitmap.o
3789
3790mod-bitmap.o: mod-bitmap.c
3791 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -c -o $@ $<
3792
3793mod-bitmap.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3794 sh $(srcdir)/genmodsrc.sh 'bitmap' $< > $@ || (rm -f $@; exit 1)
3795
3796ifneq ($(bitmap_mod_EXPORTS),no)
3797def-bitmap.lst: pre-bitmap.o
3798 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 bitmap/' > $@
3799endif
3800
3801und-bitmap.lst: pre-bitmap.o
3802 echo 'bitmap' > $@
3803 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3804
3805bitmap_mod-video_bitmap.o: video/bitmap.c $(video/bitmap.c_DEPENDENCIES)
3806 $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -MD -c -o $@ $<
3807-include bitmap_mod-video_bitmap.d
3808
3809CLEANFILES += cmd-bitmap_mod-video_bitmap.lst fs-bitmap_mod-video_bitmap.lst partmap-bitmap_mod-video_bitmap.lst
3810COMMANDFILES += cmd-bitmap_mod-video_bitmap.lst
3811FSFILES += fs-bitmap_mod-video_bitmap.lst
3812PARTMAPFILES += partmap-bitmap_mod-video_bitmap.lst
3813
3814cmd-bitmap_mod-video_bitmap.lst: video/bitmap.c $(video/bitmap.c_DEPENDENCIES) gencmdlist.sh
3815 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)
3816
3817fs-bitmap_mod-video_bitmap.lst: video/bitmap.c $(video/bitmap.c_DEPENDENCIES) genfslist.sh
3818 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)
3819
3820partmap-bitmap_mod-video_bitmap.lst: video/bitmap.c $(video/bitmap.c_DEPENDENCIES) genpartmaplist.sh
3821 set -e; $(TARGET_CC) -Ivideo -I$(srcdir)/video $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bitmap_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh bitmap > $@ || (rm -f $@; exit 1)
3822
3823
3824bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
3825bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
3826
3827# For tga.mod
3828tga_mod_SOURCES = video/readers/tga.c
3829CLEANFILES += tga.mod mod-tga.o mod-tga.c pre-tga.o tga_mod-video_readers_tga.o und-tga.lst
3830ifneq ($(tga_mod_EXPORTS),no)
3831CLEANFILES += def-tga.lst
3832DEFSYMFILES += def-tga.lst
3833endif
3834MOSTLYCLEANFILES += tga_mod-video_readers_tga.d
3835UNDSYMFILES += und-tga.lst
3836
3837tga.mod: pre-tga.o mod-tga.o $(TARGET_OBJ2ELF)
3838 -rm -f $@
3839 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-tga.o mod-tga.o
3840 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3841 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3842
3843pre-tga.o: $(tga_mod_DEPENDENCIES) tga_mod-video_readers_tga.o
3844 -rm -f $@
3845 $(TARGET_CC) $(tga_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ tga_mod-video_readers_tga.o
3846
3847mod-tga.o: mod-tga.c
3848 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -c -o $@ $<
3849
3850mod-tga.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3851 sh $(srcdir)/genmodsrc.sh 'tga' $< > $@ || (rm -f $@; exit 1)
3852
3853ifneq ($(tga_mod_EXPORTS),no)
3854def-tga.lst: pre-tga.o
3855 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 tga/' > $@
3856endif
3857
3858und-tga.lst: pre-tga.o
3859 echo 'tga' > $@
3860 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3861
3862tga_mod-video_readers_tga.o: video/readers/tga.c $(video/readers/tga.c_DEPENDENCIES)
3863 $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -MD -c -o $@ $<
3864-include tga_mod-video_readers_tga.d
3865
3866CLEANFILES += cmd-tga_mod-video_readers_tga.lst fs-tga_mod-video_readers_tga.lst partmap-tga_mod-video_readers_tga.lst
3867COMMANDFILES += cmd-tga_mod-video_readers_tga.lst
3868FSFILES += fs-tga_mod-video_readers_tga.lst
3869PARTMAPFILES += partmap-tga_mod-video_readers_tga.lst
3870
3871cmd-tga_mod-video_readers_tga.lst: video/readers/tga.c $(video/readers/tga.c_DEPENDENCIES) gencmdlist.sh
3872 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)
3873
3874fs-tga_mod-video_readers_tga.lst: video/readers/tga.c $(video/readers/tga.c_DEPENDENCIES) genfslist.sh
3875 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)
3876
3877partmap-tga_mod-video_readers_tga.lst: video/readers/tga.c $(video/readers/tga.c_DEPENDENCIES) genpartmaplist.sh
3878 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(tga_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh tga > $@ || (rm -f $@; exit 1)
3879
3880
3881tga_mod_CFLAGS = $(COMMON_CFLAGS)
3882tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
3883
3884# For jpeg.mod.
3885jpeg_mod_SOURCES = video/readers/jpeg.c
3886CLEANFILES += jpeg.mod mod-jpeg.o mod-jpeg.c pre-jpeg.o jpeg_mod-video_readers_jpeg.o und-jpeg.lst
3887ifneq ($(jpeg_mod_EXPORTS),no)
3888CLEANFILES += def-jpeg.lst
3889DEFSYMFILES += def-jpeg.lst
3890endif
3891MOSTLYCLEANFILES += jpeg_mod-video_readers_jpeg.d
3892UNDSYMFILES += und-jpeg.lst
3893
3894jpeg.mod: pre-jpeg.o mod-jpeg.o $(TARGET_OBJ2ELF)
3895 -rm -f $@
3896 $(TARGET_CC) $(jpeg_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-jpeg.o mod-jpeg.o
3897 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3898 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3899
3900pre-jpeg.o: $(jpeg_mod_DEPENDENCIES) jpeg_mod-video_readers_jpeg.o
3901 -rm -f $@
3902 $(TARGET_CC) $(jpeg_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ jpeg_mod-video_readers_jpeg.o
3903
3904mod-jpeg.o: mod-jpeg.c
3905 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jpeg_mod_CFLAGS) -c -o $@ $<
3906
3907mod-jpeg.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3908 sh $(srcdir)/genmodsrc.sh 'jpeg' $< > $@ || (rm -f $@; exit 1)
3909
3910ifneq ($(jpeg_mod_EXPORTS),no)
3911def-jpeg.lst: pre-jpeg.o
3912 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 jpeg/' > $@
3913endif
3914
3915und-jpeg.lst: pre-jpeg.o
3916 echo 'jpeg' > $@
3917 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3918
3919jpeg_mod-video_readers_jpeg.o: video/readers/jpeg.c $(video/readers/jpeg.c_DEPENDENCIES)
3920 $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jpeg_mod_CFLAGS) -MD -c -o $@ $<
3921-include jpeg_mod-video_readers_jpeg.d
3922
3923CLEANFILES += cmd-jpeg_mod-video_readers_jpeg.lst fs-jpeg_mod-video_readers_jpeg.lst partmap-jpeg_mod-video_readers_jpeg.lst
3924COMMANDFILES += cmd-jpeg_mod-video_readers_jpeg.lst
3925FSFILES += fs-jpeg_mod-video_readers_jpeg.lst
3926PARTMAPFILES += partmap-jpeg_mod-video_readers_jpeg.lst
3927
3928cmd-jpeg_mod-video_readers_jpeg.lst: video/readers/jpeg.c $(video/readers/jpeg.c_DEPENDENCIES) gencmdlist.sh
3929 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jpeg_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh jpeg > $@ || (rm -f $@; exit 1)
3930
3931fs-jpeg_mod-video_readers_jpeg.lst: video/readers/jpeg.c $(video/readers/jpeg.c_DEPENDENCIES) genfslist.sh
3932 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jpeg_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh jpeg > $@ || (rm -f $@; exit 1)
3933
3934partmap-jpeg_mod-video_readers_jpeg.lst: video/readers/jpeg.c $(video/readers/jpeg.c_DEPENDENCIES) genpartmaplist.sh
3935 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(jpeg_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh jpeg > $@ || (rm -f $@; exit 1)
3936
3937
3938jpeg_mod_CFLAGS = $(COMMON_CFLAGS)
3939jpeg_mod_LDFLAGS = $(COMMON_LDFLAGS)
3940
3941# For png.mod.
3942png_mod_SOURCES = video/readers/png.c
3943CLEANFILES += png.mod mod-png.o mod-png.c pre-png.o png_mod-video_readers_png.o und-png.lst
3944ifneq ($(png_mod_EXPORTS),no)
3945CLEANFILES += def-png.lst
3946DEFSYMFILES += def-png.lst
3947endif
3948MOSTLYCLEANFILES += png_mod-video_readers_png.d
3949UNDSYMFILES += und-png.lst
3950
3951png.mod: pre-png.o mod-png.o $(TARGET_OBJ2ELF)
3952 -rm -f $@
3953 $(TARGET_CC) $(png_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-png.o mod-png.o
3954 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
3955 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
3956
3957pre-png.o: $(png_mod_DEPENDENCIES) png_mod-video_readers_png.o
3958 -rm -f $@
3959 $(TARGET_CC) $(png_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ png_mod-video_readers_png.o
3960
3961mod-png.o: mod-png.c
3962 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(png_mod_CFLAGS) -c -o $@ $<
3963
3964mod-png.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
3965 sh $(srcdir)/genmodsrc.sh 'png' $< > $@ || (rm -f $@; exit 1)
3966
3967ifneq ($(png_mod_EXPORTS),no)
3968def-png.lst: pre-png.o
3969 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 png/' > $@
3970endif
3971
3972und-png.lst: pre-png.o
3973 echo 'png' > $@
3974 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
3975
3976png_mod-video_readers_png.o: video/readers/png.c $(video/readers/png.c_DEPENDENCIES)
3977 $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(png_mod_CFLAGS) -MD -c -o $@ $<
3978-include png_mod-video_readers_png.d
3979
3980CLEANFILES += cmd-png_mod-video_readers_png.lst fs-png_mod-video_readers_png.lst partmap-png_mod-video_readers_png.lst
3981COMMANDFILES += cmd-png_mod-video_readers_png.lst
3982FSFILES += fs-png_mod-video_readers_png.lst
3983PARTMAPFILES += partmap-png_mod-video_readers_png.lst
3984
3985cmd-png_mod-video_readers_png.lst: video/readers/png.c $(video/readers/png.c_DEPENDENCIES) gencmdlist.sh
3986 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(png_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh png > $@ || (rm -f $@; exit 1)
3987
3988fs-png_mod-video_readers_png.lst: video/readers/png.c $(video/readers/png.c_DEPENDENCIES) genfslist.sh
3989 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(png_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh png > $@ || (rm -f $@; exit 1)
3990
3991partmap-png_mod-video_readers_png.lst: video/readers/png.c $(video/readers/png.c_DEPENDENCIES) genpartmaplist.sh
3992 set -e; $(TARGET_CC) -Ivideo/readers -I$(srcdir)/video/readers $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(png_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh png > $@ || (rm -f $@; exit 1)
3993
3994
3995png_mod_CFLAGS = $(COMMON_CFLAGS)
3996png_mod_LDFLAGS = $(COMMON_LDFLAGS)
3997
d098b090 3998# For font.mod.
3999font_mod_SOURCES = font/font_cmd.c font/font.c
4000CLEANFILES += font.mod mod-font.o mod-font.c pre-font.o font_mod-font_font_cmd.o font_mod-font_font.o und-font.lst
4001ifneq ($(font_mod_EXPORTS),no)
4002CLEANFILES += def-font.lst
4003DEFSYMFILES += def-font.lst
4004endif
4005MOSTLYCLEANFILES += font_mod-font_font_cmd.d font_mod-font_font.d
4006UNDSYMFILES += und-font.lst
4007
4008font.mod: pre-font.o mod-font.o $(TARGET_OBJ2ELF)
4009 -rm -f $@
4010 $(TARGET_CC) $(font_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-font.o mod-font.o
4011 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
4012 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
4013
4014pre-font.o: $(font_mod_DEPENDENCIES) font_mod-font_font_cmd.o font_mod-font_font.o
4015 -rm -f $@
4016 $(TARGET_CC) $(font_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ font_mod-font_font_cmd.o font_mod-font_font.o
4017
4018mod-font.o: mod-font.c
4019 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -c -o $@ $<
4020
4021mod-font.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
4022 sh $(srcdir)/genmodsrc.sh 'font' $< > $@ || (rm -f $@; exit 1)
4023
4024ifneq ($(font_mod_EXPORTS),no)
4025def-font.lst: pre-font.o
4026 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 font/' > $@
4027endif
4028
4029und-font.lst: pre-font.o
4030 echo 'font' > $@
4031 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
4032
4033font_mod-font_font_cmd.o: font/font_cmd.c $(font/font_cmd.c_DEPENDENCIES)
4034 $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -MD -c -o $@ $<
4035-include font_mod-font_font_cmd.d
4036
4037CLEANFILES += cmd-font_mod-font_font_cmd.lst fs-font_mod-font_font_cmd.lst partmap-font_mod-font_font_cmd.lst
4038COMMANDFILES += cmd-font_mod-font_font_cmd.lst
4039FSFILES += fs-font_mod-font_font_cmd.lst
4040PARTMAPFILES += partmap-font_mod-font_font_cmd.lst
4041
4042cmd-font_mod-font_font_cmd.lst: font/font_cmd.c $(font/font_cmd.c_DEPENDENCIES) gencmdlist.sh
4043 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh font > $@ || (rm -f $@; exit 1)
4044
4045fs-font_mod-font_font_cmd.lst: font/font_cmd.c $(font/font_cmd.c_DEPENDENCIES) genfslist.sh
4046 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh font > $@ || (rm -f $@; exit 1)
4047
4048partmap-font_mod-font_font_cmd.lst: font/font_cmd.c $(font/font_cmd.c_DEPENDENCIES) genpartmaplist.sh
4049 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh font > $@ || (rm -f $@; exit 1)
4050
4051
4052font_mod-font_font.o: font/font.c $(font/font.c_DEPENDENCIES)
4053 $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -MD -c -o $@ $<
4054-include font_mod-font_font.d
4055
4056CLEANFILES += cmd-font_mod-font_font.lst fs-font_mod-font_font.lst partmap-font_mod-font_font.lst
4057COMMANDFILES += cmd-font_mod-font_font.lst
4058FSFILES += fs-font_mod-font_font.lst
4059PARTMAPFILES += partmap-font_mod-font_font.lst
4060
4061cmd-font_mod-font_font.lst: font/font.c $(font/font.c_DEPENDENCIES) gencmdlist.sh
4062 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh font > $@ || (rm -f $@; exit 1)
4063
4064fs-font_mod-font_font.lst: font/font.c $(font/font.c_DEPENDENCIES) genfslist.sh
4065 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh font > $@ || (rm -f $@; exit 1)
4066
4067partmap-font_mod-font_font.lst: font/font.c $(font/font.c_DEPENDENCIES) genpartmaplist.sh
4068 set -e; $(TARGET_CC) -Ifont -I$(srcdir)/font $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(font_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh font > $@ || (rm -f $@; exit 1)
4069
4070
4071font_mod_CFLAGS = $(COMMON_CFLAGS)
4072font_mod_LDFLAGS = $(COMMON_LDFLAGS)
4073
4074# For gfxterm.mod.
4075gfxterm_mod_SOURCES = term/gfxterm.c
4076CLEANFILES += gfxterm.mod mod-gfxterm.o mod-gfxterm.c pre-gfxterm.o gfxterm_mod-term_gfxterm.o und-gfxterm.lst
4077ifneq ($(gfxterm_mod_EXPORTS),no)
4078CLEANFILES += def-gfxterm.lst
4079DEFSYMFILES += def-gfxterm.lst
4080endif
4081MOSTLYCLEANFILES += gfxterm_mod-term_gfxterm.d
4082UNDSYMFILES += und-gfxterm.lst
4083
4084gfxterm.mod: pre-gfxterm.o mod-gfxterm.o $(TARGET_OBJ2ELF)
4085 -rm -f $@
4086 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-gfxterm.o mod-gfxterm.o
4087 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
4088 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
4089
4090pre-gfxterm.o: $(gfxterm_mod_DEPENDENCIES) gfxterm_mod-term_gfxterm.o
4091 -rm -f $@
4092 $(TARGET_CC) $(gfxterm_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ gfxterm_mod-term_gfxterm.o
4093
4094mod-gfxterm.o: mod-gfxterm.c
4095 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -c -o $@ $<
4096
4097mod-gfxterm.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
4098 sh $(srcdir)/genmodsrc.sh 'gfxterm' $< > $@ || (rm -f $@; exit 1)
4099
4100ifneq ($(gfxterm_mod_EXPORTS),no)
4101def-gfxterm.lst: pre-gfxterm.o
4102 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 gfxterm/' > $@
4103endif
4104
4105und-gfxterm.lst: pre-gfxterm.o
4106 echo 'gfxterm' > $@
4107 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
4108
4109gfxterm_mod-term_gfxterm.o: term/gfxterm.c $(term/gfxterm.c_DEPENDENCIES)
4110 $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -MD -c -o $@ $<
4111-include gfxterm_mod-term_gfxterm.d
4112
4113CLEANFILES += cmd-gfxterm_mod-term_gfxterm.lst fs-gfxterm_mod-term_gfxterm.lst partmap-gfxterm_mod-term_gfxterm.lst
4114COMMANDFILES += cmd-gfxterm_mod-term_gfxterm.lst
4115FSFILES += fs-gfxterm_mod-term_gfxterm.lst
4116PARTMAPFILES += partmap-gfxterm_mod-term_gfxterm.lst
4117
4118cmd-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c $(term/gfxterm.c_DEPENDENCIES) gencmdlist.sh
4119 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)
4120
4121fs-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c $(term/gfxterm.c_DEPENDENCIES) genfslist.sh
4122 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)
4123
4124partmap-gfxterm_mod-term_gfxterm.lst: term/gfxterm.c $(term/gfxterm.c_DEPENDENCIES) genpartmaplist.sh
4125 set -e; $(TARGET_CC) -Iterm -I$(srcdir)/term $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gfxterm_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh gfxterm > $@ || (rm -f $@; exit 1)
4126
4127
4128gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
4129gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
4130
233b1628 4131# Misc.
9175e93d 4132pkglib_MODULES += gzio.mod bufio.mod elf.mod
2166cc83 4133
4134# For elf.mod.
4135elf_mod_SOURCES = kern/elf.c
4136CLEANFILES += elf.mod mod-elf.o mod-elf.c pre-elf.o elf_mod-kern_elf.o und-elf.lst
4137ifneq ($(elf_mod_EXPORTS),no)
4138CLEANFILES += def-elf.lst
4139DEFSYMFILES += def-elf.lst
4140endif
4141MOSTLYCLEANFILES += elf_mod-kern_elf.d
4142UNDSYMFILES += und-elf.lst
4143
2a8a80e4 4144elf.mod: pre-elf.o mod-elf.o $(TARGET_OBJ2ELF)
2166cc83 4145 -rm -f $@
2a8a80e4 4146 $(TARGET_CC) $(elf_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-elf.o mod-elf.o
4147 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
4148 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
2166cc83 4149
4150pre-elf.o: $(elf_mod_DEPENDENCIES) elf_mod-kern_elf.o
4151 -rm -f $@
4152 $(TARGET_CC) $(elf_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ elf_mod-kern_elf.o
4153
4154mod-elf.o: mod-elf.c
4155 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(elf_mod_CFLAGS) -c -o $@ $<
4156
926b9823 4157mod-elf.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
2166cc83 4158 sh $(srcdir)/genmodsrc.sh 'elf' $< > $@ || (rm -f $@; exit 1)
4159
4160ifneq ($(elf_mod_EXPORTS),no)
4161def-elf.lst: pre-elf.o
4162 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 elf/' > $@
4163endif
4164
4165und-elf.lst: pre-elf.o
4166 echo 'elf' > $@
4167 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
4168
7d31f41f 4169elf_mod-kern_elf.o: kern/elf.c $(kern/elf.c_DEPENDENCIES)
46e5e5cb 4170 $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(elf_mod_CFLAGS) -MD -c -o $@ $<
2166cc83 4171-include elf_mod-kern_elf.d
4172
228ffeab 4173CLEANFILES += cmd-elf_mod-kern_elf.lst fs-elf_mod-kern_elf.lst partmap-elf_mod-kern_elf.lst
2166cc83 4174COMMANDFILES += cmd-elf_mod-kern_elf.lst
4175FSFILES += fs-elf_mod-kern_elf.lst
228ffeab 4176PARTMAPFILES += partmap-elf_mod-kern_elf.lst
2166cc83 4177
7d31f41f 4178cmd-elf_mod-kern_elf.lst: kern/elf.c $(kern/elf.c_DEPENDENCIES) gencmdlist.sh
2166cc83 4179 set -e; $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(elf_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh elf > $@ || (rm -f $@; exit 1)
4180
7d31f41f 4181fs-elf_mod-kern_elf.lst: kern/elf.c $(kern/elf.c_DEPENDENCIES) genfslist.sh
2166cc83 4182 set -e; $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(elf_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh elf > $@ || (rm -f $@; exit 1)
4183
228ffeab 4184partmap-elf_mod-kern_elf.lst: kern/elf.c $(kern/elf.c_DEPENDENCIES) genpartmaplist.sh
4185 set -e; $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(elf_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh elf > $@ || (rm -f $@; exit 1)
4186
2166cc83 4187
4188elf_mod_CFLAGS = $(COMMON_CFLAGS)
4189elf_mod_LDFLAGS = $(COMMON_LDFLAGS)
233b1628 4190
4191# For gzio.mod.
4192gzio_mod_SOURCES = io/gzio.c
83709125 4193CLEANFILES += gzio.mod mod-gzio.o mod-gzio.c pre-gzio.o gzio_mod-io_gzio.o und-gzio.lst
4194ifneq ($(gzio_mod_EXPORTS),no)
4195CLEANFILES += def-gzio.lst
233b1628 4196DEFSYMFILES += def-gzio.lst
83709125 4197endif
4198MOSTLYCLEANFILES += gzio_mod-io_gzio.d
233b1628 4199UNDSYMFILES += und-gzio.lst
4200
2a8a80e4 4201gzio.mod: pre-gzio.o mod-gzio.o $(TARGET_OBJ2ELF)
233b1628 4202 -rm -f $@
2a8a80e4 4203 $(TARGET_CC) $(gzio_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-gzio.o mod-gzio.o
4204 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
4205 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
233b1628 4206
e02ac02c 4207pre-gzio.o: $(gzio_mod_DEPENDENCIES) gzio_mod-io_gzio.o
233b1628 4208 -rm -f $@
e02ac02c 4209 $(TARGET_CC) $(gzio_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ gzio_mod-io_gzio.o
233b1628 4210
4211mod-gzio.o: mod-gzio.c
b977bf01 4212 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gzio_mod_CFLAGS) -c -o $@ $<
233b1628 4213
926b9823 4214mod-gzio.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
233b1628 4215 sh $(srcdir)/genmodsrc.sh 'gzio' $< > $@ || (rm -f $@; exit 1)
4216
83709125 4217ifneq ($(gzio_mod_EXPORTS),no)
233b1628 4218def-gzio.lst: pre-gzio.o
4219 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 gzio/' > $@
83709125 4220endif
233b1628 4221
4222und-gzio.lst: pre-gzio.o
4223 echo 'gzio' > $@
4224 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
4225
7d31f41f 4226gzio_mod-io_gzio.o: io/gzio.c $(io/gzio.c_DEPENDENCIES)
46e5e5cb 4227 $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gzio_mod_CFLAGS) -MD -c -o $@ $<
233b1628 4228-include gzio_mod-io_gzio.d
4229
228ffeab 4230CLEANFILES += cmd-gzio_mod-io_gzio.lst fs-gzio_mod-io_gzio.lst partmap-gzio_mod-io_gzio.lst
233b1628 4231COMMANDFILES += cmd-gzio_mod-io_gzio.lst
4232FSFILES += fs-gzio_mod-io_gzio.lst
228ffeab 4233PARTMAPFILES += partmap-gzio_mod-io_gzio.lst
233b1628 4234
7d31f41f 4235cmd-gzio_mod-io_gzio.lst: io/gzio.c $(io/gzio.c_DEPENDENCIES) gencmdlist.sh
26c607b9 4236 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gzio_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh gzio > $@ || (rm -f $@; exit 1)
233b1628 4237
7d31f41f 4238fs-gzio_mod-io_gzio.lst: io/gzio.c $(io/gzio.c_DEPENDENCIES) genfslist.sh
26c607b9 4239 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gzio_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh gzio > $@ || (rm -f $@; exit 1)
233b1628 4240
228ffeab 4241partmap-gzio_mod-io_gzio.lst: io/gzio.c $(io/gzio.c_DEPENDENCIES) genpartmaplist.sh
4242 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(gzio_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh gzio > $@ || (rm -f $@; exit 1)
4243
233b1628 4244
4245gzio_mod_CFLAGS = $(COMMON_CFLAGS)
4246gzio_mod_LDFLAGS = $(COMMON_LDFLAGS)
9175e93d 4247
4248# For bufio.mod.
4249bufio_mod_SOURCES = io/bufio.c
4250CLEANFILES += bufio.mod mod-bufio.o mod-bufio.c pre-bufio.o bufio_mod-io_bufio.o und-bufio.lst
4251ifneq ($(bufio_mod_EXPORTS),no)
4252CLEANFILES += def-bufio.lst
4253DEFSYMFILES += def-bufio.lst
4254endif
4255MOSTLYCLEANFILES += bufio_mod-io_bufio.d
4256UNDSYMFILES += und-bufio.lst
4257
4258bufio.mod: pre-bufio.o mod-bufio.o $(TARGET_OBJ2ELF)
4259 -rm -f $@
4260 $(TARGET_CC) $(bufio_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-bufio.o mod-bufio.o
4261 if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
4262 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
4263
4264pre-bufio.o: $(bufio_mod_DEPENDENCIES) bufio_mod-io_bufio.o
4265 -rm -f $@
4266 $(TARGET_CC) $(bufio_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ bufio_mod-io_bufio.o
4267
4268mod-bufio.o: mod-bufio.c
4269 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bufio_mod_CFLAGS) -c -o $@ $<
4270
926b9823 4271mod-bufio.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
9175e93d 4272 sh $(srcdir)/genmodsrc.sh 'bufio' $< > $@ || (rm -f $@; exit 1)
4273
4274ifneq ($(bufio_mod_EXPORTS),no)
4275def-bufio.lst: pre-bufio.o
4276 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 bufio/' > $@
4277endif
4278
4279und-bufio.lst: pre-bufio.o
4280 echo 'bufio' > $@
4281 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
4282
4283bufio_mod-io_bufio.o: io/bufio.c $(io/bufio.c_DEPENDENCIES)
4284 $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bufio_mod_CFLAGS) -MD -c -o $@ $<
4285-include bufio_mod-io_bufio.d
4286
4287CLEANFILES += cmd-bufio_mod-io_bufio.lst fs-bufio_mod-io_bufio.lst partmap-bufio_mod-io_bufio.lst
4288COMMANDFILES += cmd-bufio_mod-io_bufio.lst
4289FSFILES += fs-bufio_mod-io_bufio.lst
4290PARTMAPFILES += partmap-bufio_mod-io_bufio.lst
4291
4292cmd-bufio_mod-io_bufio.lst: io/bufio.c $(io/bufio.c_DEPENDENCIES) gencmdlist.sh
4293 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bufio_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh bufio > $@ || (rm -f $@; exit 1)
4294
4295fs-bufio_mod-io_bufio.lst: io/bufio.c $(io/bufio.c_DEPENDENCIES) genfslist.sh
4296 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bufio_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh bufio > $@ || (rm -f $@; exit 1)
4297
4298partmap-bufio_mod-io_bufio.lst: io/bufio.c $(io/bufio.c_DEPENDENCIES) genpartmaplist.sh
4299 set -e; $(TARGET_CC) -Iio -I$(srcdir)/io $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(bufio_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh bufio > $@ || (rm -f $@; exit 1)
4300
4301
4302bufio_mod_CFLAGS = $(COMMON_CFLAGS)
4303bufio_mod_LDFLAGS = $(COMMON_LDFLAGS)