2009-10-29 Robert Millan <rmh.grub@aybabtu.com>
[grub2/jjazz.git] / conf / i386-efi.rmk
blob99ab06f6428177d9ebbfaf8777a2488695cf7a53
1 # -*- makefile -*-
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
10 # Utilities.
11 bin_UTILITIES = grub-mkimage
12 sbin_UTILITIES = grub-mkdevicemap
13 #ifeq ($(enable_grub_emu), yes)
14 #sbin_UTILITIES += grub-emu
15 #endif
17 # For grub-mkimage.
18 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
19         util/resolve.c
20 util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
22 # For grub-setup.
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
34 # For grub-emu.
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 commands/keystatus.c          \
41         commands/i386/cpuid.c                                           \
42         commands/password.c                                             \
43         lib/envblk.c commands/loadenv.c                                 \
44         disk/loopback.c                                                 \
45         \
46         fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c                 \
47         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
48         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
49         fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
50         fs/befs.c fs/befs_be.c fs/tar.c                         \
51         \
52         io/gzio.c                                                       \
53         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
54         kern/err.c kern/list.c kern/handler.c                           \
55         kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
56         kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
57         kern/partition.c kern/reader.c kern/term.c                      \
58         kern/rescue_reader.c kern/rescue_parser.c                       \
59         lib/arg.c normal/cmdline.c normal/command.c normal/datetime.c   \
60         normal/auth.c normal/autofs.c                                   \
61         normal/completion.c normal/context.c normal/main.c              \
62         normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
63         normal/menu_text.c                                              \
64         normal/color.c                                                  \
65         script/sh/main.c script/sh/execute.c script/sh/function.c       \
66         script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
67         partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
68         partmap/acorn.c partmap/gpt.c                                   \
69         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
70         util/hostdisk.c util/getroot.c                                  \
71         \
72         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
73         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
74         commands/parttool.c parttool/msdospart.c                                \
75         grub_emu_init.c
77 grub_emu_LDFLAGS = $(LIBCURSES)
79 # Scripts.
80 sbin_SCRIPTS = grub-install
82 # For grub-install.
83 grub_install_SOURCES = util/i386/efi/grub-install.in
85 # Modules.
86 pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
87         linux.mod halt.mod reboot.mod pci.mod lspci.mod \
88         datetime.mod date.mod datehook.mod loadbios.mod \
89         fixvideo.mod mmap.mod acpi.mod
91 # For kernel.mod.
92 kernel_mod_EXPORTS = no
93 kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
94         kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
95         kern/misc.c kern/mm.c kern/reader.c kern/term.c \
96         kern/rescue_parser.c kern/rescue_reader.c \
97         kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
98         kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
99         term/efi/console.c disk/efi/efidisk.c \
100         kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
101         kern/i386/tsc.c kern/i386/pit.c \
102         kern/generic/rtc_get_time_ms.c \
103         kern/generic/millisleep.c
104 kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
105         env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
106         partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
107         efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h
108 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
109 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
110 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
112 MOSTLYCLEANFILES += symlist.c
113 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
114 DEFSYMFILES += kernel_syms.lst
116 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
117         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
119 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
120         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
122 # For boot.mod.
123 pkglib_MODULES += boot.mod 
124 boot_mod_SOURCES = commands/boot.c
125 boot_mod_CFLAGS = $(COMMON_CFLAGS)
126 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
128 # For acpi.mod.
129 acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
130 acpi_mod_CFLAGS = $(COMMON_CFLAGS)
131 acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
133 # For mmap.mod.
134 mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
135                    mmap/efi/mmap.c
136 mmap_mod_CFLAGS = $(COMMON_CFLAGS)
137 mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
139 # For chain.mod.
140 chain_mod_SOURCES = loader/efi/chainloader.c
141 chain_mod_CFLAGS = $(COMMON_CFLAGS)
142 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
144 # For appleldr.mod.
145 appleldr_mod_SOURCES = loader/efi/appleloader.c
146 appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
147 appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
149 # For linux.mod.
150 linux_mod_SOURCES = loader/i386/efi/linux.c
151 linux_mod_CFLAGS = $(COMMON_CFLAGS)
152 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
154 # For halt.mod.
155 halt_mod_SOURCES = commands/halt.c
156 halt_mod_CFLAGS = $(COMMON_CFLAGS)
157 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
159 # For reboot.mod.
160 reboot_mod_SOURCES = commands/reboot.c
161 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
162 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
164 # For pci.mod
165 pci_mod_SOURCES = bus/pci.c
166 pci_mod_CFLAGS = $(COMMON_CFLAGS)
167 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
169 # For lspci.mod
170 lspci_mod_SOURCES = commands/lspci.c
171 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
172 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
174 # For datetime.mod
175 datetime_mod_SOURCES = lib/efi/datetime.c
176 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
177 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
179 # For date.mod
180 date_mod_SOURCES = commands/date.c
181 date_mod_CFLAGS = $(COMMON_CFLAGS)
182 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
184 # For datehook.mod
185 datehook_mod_SOURCES = hook/datehook.c
186 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
187 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
189 # For loadbios.mod
190 loadbios_mod_SOURCES = commands/efi/loadbios.c
191 loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
192 loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
194 # For fixvideo.mod
195 fixvideo_mod_SOURCES = commands/efi/fixvideo.c
196 fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
197 fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
199 pkglib_MODULES += xnu.mod
200 xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
201          loader/macho.c loader/xnu.c loader/i386/xnu_helper.S
202 xnu_mod_CFLAGS = $(COMMON_CFLAGS)
203 xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
204 xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
206 include $(srcdir)/conf/i386.mk
207 include $(srcdir)/conf/common.mk