3 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
4 COMMON_CFLAGS = -fno-builtin -m32
5 COMMON_LDFLAGS = -melf_i386 -nostdlib
7 # Used by various components. These rules need to precede them.
8 script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
11 bin_UTILITIES = grub-mkimage
12 sbin_UTILITIES = grub-mkdevicemap
13 #ifeq ($(enable_grub_emu), yes)
14 #sbin_UTILITIES += grub-emu
18 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
20 util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
23 #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
24 # util/misc.c util/getroot.c kern/device.c kern/disk.c \
25 # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
26 # fs/sfs.c kern/parser.c kern/partition.c partmap/msdos.c \
27 # fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
28 # kern/fs.c kern/env.c fs/fshelp.c
30 # For grub-mkdevicemap.
31 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
32 util/devicemap.c util/misc.c
35 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
36 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
37 commands/configfile.c commands/help.c \
38 commands/handler.c commands/ls.c commands/test.c \
39 commands/search.c commands/hexdump.c lib/hexdump.c \
40 commands/halt.c commands/reboot.c \
41 commands/i386/cpuid.c \
44 fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
45 fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
46 fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
47 fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \
50 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
51 kern/err.c kern/list.c kern/handler.c \
52 kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
53 kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
54 kern/partition.c kern/reader.c kern/term.c \
55 kern/rescue_reader.c kern/rescue_parser.c \
56 lib/arg.c normal/cmdline.c normal/command.c normal/datetime.c \
58 normal/completion.c normal/context.c normal/main.c \
59 normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
62 script/sh/main.c script/sh/execute.c script/sh/function.c \
63 script/sh/lexer.c script/sh/script.c grub_script.tab.c \
64 partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
65 partmap/acorn.c partmap/gpt.c \
66 util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
67 util/hostdisk.c util/getroot.c \
69 disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
70 disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
71 commands/parttool.c parttool/msdospart.c \
74 grub_emu_LDFLAGS = $(LIBCURSES)
77 sbin_SCRIPTS = grub-install
80 grub_install_SOURCES = util/i386/efi/grub-install.in
83 pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
84 linux.mod halt.mod reboot.mod pci.mod lspci.mod \
85 datetime.mod date.mod datehook.mod loadbios.mod \
86 fixvideo.mod mmap.mod acpi.mod
89 kernel_mod_EXPORTS = no
90 kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
91 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
92 kern/misc.c kern/mm.c kern/reader.c kern/term.c \
93 kern/rescue_parser.c kern/rescue_reader.c \
94 kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
95 kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
96 term/efi/console.c disk/efi/efidisk.c \
97 kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
98 kern/i386/tsc.c kern/i386/pit.c \
99 kern/generic/rtc_get_time_ms.c \
100 kern/generic/millisleep.c
101 kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
102 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
103 partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
104 efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h
105 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
106 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
107 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
109 MOSTLYCLEANFILES += symlist.c
110 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
111 DEFSYMFILES += kernel_syms.lst
113 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
114 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
116 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
117 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
120 pkglib_MODULES += boot.mod
121 boot_mod_SOURCES = commands/boot.c
122 boot_mod_CFLAGS = $(COMMON_CFLAGS)
123 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
126 acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
127 acpi_mod_CFLAGS = $(COMMON_CFLAGS)
128 acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
131 mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
133 mmap_mod_CFLAGS = $(COMMON_CFLAGS)
134 mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
137 chain_mod_SOURCES = loader/efi/chainloader.c
138 chain_mod_CFLAGS = $(COMMON_CFLAGS)
139 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
142 appleldr_mod_SOURCES = loader/efi/appleloader.c
143 appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
144 appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
147 linux_mod_SOURCES = loader/i386/efi/linux.c
148 linux_mod_CFLAGS = $(COMMON_CFLAGS)
149 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
152 halt_mod_SOURCES = commands/halt.c
153 halt_mod_CFLAGS = $(COMMON_CFLAGS)
154 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
157 reboot_mod_SOURCES = commands/reboot.c
158 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
159 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
162 pci_mod_SOURCES = bus/pci.c
163 pci_mod_CFLAGS = $(COMMON_CFLAGS)
164 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
167 lspci_mod_SOURCES = commands/lspci.c
168 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
169 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
172 datetime_mod_SOURCES = lib/efi/datetime.c
173 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
174 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
177 date_mod_SOURCES = commands/date.c
178 date_mod_CFLAGS = $(COMMON_CFLAGS)
179 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
182 datehook_mod_SOURCES = hook/datehook.c
183 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
184 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
187 loadbios_mod_SOURCES = commands/efi/loadbios.c
188 loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
189 loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
192 fixvideo_mod_SOURCES = commands/efi/fixvideo.c
193 fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
194 fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
196 pkglib_MODULES += xnu.mod
197 xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
198 loader/macho.c loader/xnu.c loader/i386/xnu_helper.S
199 xnu_mod_CFLAGS = $(COMMON_CFLAGS)
200 xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
201 xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
203 include $(srcdir)/conf/i386.mk
204 include $(srcdir)/conf/common.mk