2009-03-09 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder/solaris.git] / conf / x86_64-efi.rmk
blob47132f7144f7c7dc8c3e2316a2e72bf4760664b8
1 # -*- makefile -*-
3 COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
4 COMMON_CFLAGS = -fno-builtin -m64
5 COMMON_LDFLAGS = -melf_x86_64 -nostdlib
7 # Used by various components.  These rules need to precede them.
8 normal/execute.c_DEPENDENCIES = grub_script.tab.h
9 normal/command.c_DEPENDENCIES = grub_script.tab.h
10 normal/function.c_DEPENDENCIES = grub_script.tab.h
11 normal/lexer.c_DEPENDENCIES = grub_script.tab.h
13 # Utilities.
14 bin_UTILITIES = grub-mkimage
15 #sbin_UTILITIES = grub-mkdevicemap
16 #ifeq ($(enable_grub_emu), yes)
17 #sbin_UTILITIES += grub-emu
18 #endif
20 # For grub-mkimage.
21 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
22         util/resolve.c
24 # For grub-setup.
25 #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
26 #       util/misc.c util/getroot.c kern/device.c kern/disk.c    \
27 #       kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c    \
28 #       fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c            \
29 #       fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c  \
30 #       kern/fs.c kern/env.c fs/fshelp.c
32 # For grub-mkdevicemap.
33 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c
35 # For grub-emu.
36 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
37 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c        \
38         commands/configfile.c commands/help.c                           \
39         commands/handler.c commands/ls.c commands/test.c                \
40         commands/search.c commands/hexdump.c lib/hexdump.c              \
41         commands/halt.c commands/reboot.c                               \
42         commands/i386/cpuid.c                                           \
43         disk/loopback.c                                                 \
44         \
45         fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c                 \
46         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
47         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
48         fs/ufs.c fs/xfs.c fs/afs.c                                      \
49         \
50         io/gzio.c                                                       \
51         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
52         kern/err.c kern/list.c kern/handler.c                           \
53         normal/execute.c kern/file.c kern/fs.c normal/lexer.c           \
54         kern/loader.c kern/main.c kern/misc.c kern/parser.c             \
55         grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c    \
56         normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
57         normal/completion.c normal/context.c normal/main.c              \
58         normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
59         normal/menu_text.c                                              \
60         normal/misc.c normal/script.c                                   \
61         normal/color.c                                                  \
62         partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c      \
63         partmap/acorn.c partmap/gpt.c                                   \
64         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
65         util/hostdisk.c util/getroot.c                                  \
66         util/i386/pc/misc.c                                             \
67         \
68         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
69         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
70         grub_emu_init.c
72 grub_emu_LDFLAGS = $(LIBCURSES)
74 # Scripts.
75 sbin_SCRIPTS = grub-install
77 # For grub-install.
78 grub_install_SOURCES = util/i386/efi/grub-install.in
80 # Modules.
81 pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
82         halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
83         datetime.mod date.mod datehook.mod
85 # For kernel.mod.
86 kernel_mod_EXPORTS = no
87 kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
88         kern/main.c kern/device.c \
89         kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
90         kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
91         kern/x86_64/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
92         kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
93         kern/time.c kern/list.c kern/handler.c \
94         kern/i386/tsc.c kern/i386/pit.c \
95         kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \
96         term/efi/console.c disk/efi/efidisk.c
97 kernel_mod_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
98         env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
99         partition.h pc_partition.h rescue.h symbol.h term.h time.h types.h \
100         efi/efi.h efi/time.h efi/disk.h machine/loader.h list.h handler.h
101 kernel_mod_CFLAGS = $(COMMON_CFLAGS)
102 kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
103 kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
105 MOSTLYCLEANFILES += symlist.c
106 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
107 DEFSYMFILES += kernel_syms.lst
109 symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
110         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
112 kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
113         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
116 # Only arch dependant part of normal.mod will be here. Common part for
117 # all architecures of normal.mod is at start and should be kept at sync
118 # with other makefiles.
120 # Please put arch dependant part of normal.mod at the end of list to
121 # keep it simpler to update to different architectures.
123 normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c     \
124         normal/completion.c normal/execute.c                            \
125         normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
126         normal/menu_text.c                                              \
127         normal/color.c                                                  \
128         normal/menu_viewer.c normal/menu_entry.c                        \
129         normal/misc.c grub_script.tab.c                                 \
130         normal/script.c                                                 \
131         normal/x86_64/setjmp.S
132 normal_mod_CFLAGS = $(COMMON_CFLAGS)
133 normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
134 normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
136 # For _chain.mod.
137 _chain_mod_SOURCES = loader/efi/chainloader.c
138 _chain_mod_CFLAGS = $(COMMON_CFLAGS)
139 _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
141 # For chain.mod.
142 chain_mod_SOURCES = loader/efi/chainloader_normal.c
143 chain_mod_CFLAGS = $(COMMON_CFLAGS)
144 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
146 # For appleldr.mod.
147 appleldr_mod_SOURCES = loader/efi/appleloader.c
148 appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
149 appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
151 # For _linux.mod.
152 _linux_mod_SOURCES = loader/i386/efi/linux.c
153 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
154 _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
156 # For linux.mod.
157 linux_mod_SOURCES = loader/linux_normal.c
158 linux_mod_CFLAGS = $(COMMON_CFLAGS)
159 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
161 # For halt.mod.
162 halt_mod_SOURCES = commands/halt.c
163 halt_mod_CFLAGS = $(COMMON_CFLAGS)
164 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
166 # For reboot.mod.
167 reboot_mod_SOURCES = commands/reboot.c
168 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
169 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
171 # For pci.mod
172 pci_mod_SOURCES = bus/pci.c
173 pci_mod_CFLAGS = $(COMMON_CFLAGS)
174 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
176 # For lspci.mod
177 lspci_mod_SOURCES = commands/lspci.c
178 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
179 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
181 # For datetime.mod
182 datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
183 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
184 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
186 # For date.mod
187 date_mod_SOURCES = commands/date.c
188 date_mod_CFLAGS = $(COMMON_CFLAGS)
189 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
191 # For datehook.mod
192 datehook_mod_SOURCES = hook/datehook.c
193 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
194 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
196 include $(srcdir)/conf/i386.mk
197 include $(srcdir)/conf/common.mk