]> git.proxmox.com Git - grub2.git/blame - conf/i386-pc.rmk
2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
[grub2.git] / conf / i386-pc.rmk
CommitLineData
6a161fa9 1# -*- makefile -*-
2
43e7f879 3COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
59b8208a 4COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
6b146090 5COMMON_LDFLAGS = -m32 -nostdlib
6a161fa9 6
7# Images.
020616c2 8pkgdata_IMAGES = boot.img diskboot.img kernel.img pxeboot.img
6a161fa9 9
10# For boot.img.
11boot_img_SOURCES = boot/i386/pc/boot.S
12boot_img_ASFLAGS = $(COMMON_ASFLAGS)
13boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
14
020616c2 15# For pxeboot.img
16pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
17pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
ebedfd00 18pxeboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
020616c2 19
6a161fa9 20# For diskboot.img.
21diskboot_img_SOURCES = boot/i386/pc/diskboot.S
22diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
23diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000
24
25# For kernel.img.
26kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
27 kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
28 kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
04ccf3ec 29 kern/i386/dl.c kern/i386/pc/init.c kern/parser.c kern/partition.c \
db1771cf 30 kern/env.c disk/i386/pc/biosdisk.c \
6a161fa9 31 term/i386/pc/console.c \
32 symlist.c
2166cc83 33kernel_img_HEADERS = arg.h boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
34 env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
35 partition.h pc_partition.h rescue.h symbol.h term.h types.h \
8ceafda2 36 machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
e85e144b 37 machine/memory.h machine/loader.h machine/time.h machine/vga.h \
38 machine/vbe.h
6a161fa9 39kernel_img_CFLAGS = $(COMMON_CFLAGS)
40kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
59b8208a 41kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
6a161fa9 42
43MOSTLYCLEANFILES += symlist.c kernel_syms.lst
44DEFSYMFILES += kernel_syms.lst
45
7b455f4d 46symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
47 /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
6a161fa9 48
7b455f4d 49kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
50 /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
6a161fa9 51
52# Utilities.
4b13b216 53bin_UTILITIES = grub-mkimage
ddd5cee9 54sbin_UTILITIES = grub-setup grub-emu grub-mkdevicemap grub-probe
6a161fa9 55
4b13b216 56# For grub-mkimage.
57grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
6a161fa9 58 util/resolve.c
4ac9bd04 59grub_mkimage_LDFLAGS = $(LIBLZO)
6a161fa9 60
4b13b216 61# For grub-setup.
50214199 62grub_setup_SOURCES = util/i386/pc/grub-setup.c util/i386/pc/biosdisk.c \
63 util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
64 kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
65 fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
66 fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
2b002173 67 kern/fs.c kern/env.c fs/fshelp.c util/raid.c util/lvm.c
1f7315a3 68
e0f050c2 69# For grub-mkdevicemap.
70grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
71
ddd5cee9 72# For grub-probe.
73grub_probe_SOURCES = util/i386/pc/grub-probe.c \
8b5f3938 74 util/i386/pc/biosdisk.c util/misc.c util/i386/pc/getroot.c \
75 kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c \
04ccf3ec 76 fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c \
77 fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c \
790707f2 78 fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c disk/lvm.c disk/raid.c
8b5f3938 79
e0f050c2 80# For grub-emu.
e02ac02c 81grub_emu_DEPENDENCIES = grub_script.tab.c grub_script.tab.h \
82 grub_modules_init.h
4e93851c 83grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
b5ef1102 84 commands/configfile.c commands/echo.c commands/help.c \
daac212a 85 commands/terminal.c commands/ls.c commands/test.c \
89a7d726 86 commands/search.c commands/blocklist.c \
e6b92c8a 87 commands/i386/pc/halt.c commands/i386/pc/reboot.c \
2b002173 88 disk/loopback.c disk/raid.c disk/lvm.c \
57bdbde3 89 fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
50214199 90 fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
d9864ee1 91 io/gzio.c \
2166cc83 92 kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
93 kern/err.c \
daac212a 94 normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
95 kern/loader.c kern/main.c kern/misc.c kern/parser.c \
96 grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
97 normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
4e93851c 98 normal/completion.c normal/main.c \
daac212a 99 normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
4ed2e1dd 100 partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
b04216ab 101 partmap/acorn.c partmap/gpt.c \
e6b92c8a 102 util/console.c util/grub-emu.c util/misc.c \
103 util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
6d099807 104 util/i386/pc/misc.c grub_emu_init.c
e6b92c8a 105
f4917dfd 106grub_emu_LDFLAGS = $(LIBCURSES)
1cc73a62 107
075a1650 108# Scripts.
109sbin_SCRIPTS = grub-install
110
111# For grub-install.
112grub_install_SOURCES = util/i386/pc/grub-install.in
113
6a161fa9 114# Modules.
bd0d7896 115pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \
233b1628 116 _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \
bd0d7896 117 vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
ad2a06ed 118 videotest.mod play.mod bitmap.mod tga.mod
6a161fa9 119
ce5bf700 120# For _chain.mod.
121_chain_mod_SOURCES = loader/i386/pc/chainloader.c
122_chain_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 123_chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
6a161fa9 124
8ddad845 125# For chain.mod.
126chain_mod_SOURCES = loader/i386/pc/chainloader_normal.c
127chain_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 128chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
8ddad845 129
ce5bf700 130# For _linux.mod.
131_linux_mod_SOURCES = loader/i386/pc/linux.c
132_linux_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 133_linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
134
b47efe30 135# For linux.mod.
136linux_mod_SOURCES = loader/i386/pc/linux_normal.c
137linux_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 138linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
ce5bf700 139
140# For normal.mod.
e02ac02c 141normal_mod_DEPENDENCIES = grub_script.tab.c grub_script.tab.h
4d4e372e 142normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
4e93851c 143 normal/completion.c normal/execute.c \
daac212a 144 normal/function.c normal/lexer.c normal/main.c normal/menu.c \
145 normal/menu_entry.c normal/misc.c grub_script.tab.c \
146 normal/script.c normal/i386/setjmp.S
ce5bf700 147normal_mod_CFLAGS = $(COMMON_CFLAGS)
43e7f879 148normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
59b8208a 149normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
977329f5 150
990cf3aa 151# For reboot.mod.
152reboot_mod_SOURCES = commands/i386/pc/reboot.c
153reboot_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 154reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
990cf3aa 155
156# For halt.mod.
157halt_mod_SOURCES = commands/i386/pc/halt.c
158halt_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 159halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
990cf3aa 160
47d2d65e 161# For serial.mod.
162serial_mod_SOURCES = term/i386/pc/serial.c
163serial_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 164serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
47d2d65e 165
9a5c1ade 166# For _multiboot.mod.
167_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
168_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 169_multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
b47efe30 170
171# For multiboot.mod.
172multiboot_mod_SOURCES = loader/i386/pc/multiboot_normal.c
173multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 174multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
3f1578fe 175
6323696a 176# For vbe.mod.
b4b93674 177vbe_mod_SOURCES = video/i386/pc/vbe.c video/i386/pc/vbeblit.c \
ad2a06ed 178 video/i386/pc/vbefill.c video/i386/pc/vbeutil.c
6323696a 179vbe_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 180vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
6323696a 181
1f0a95e4 182# For vbeinfo.mod.
183vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
184vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 185vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
6323696a 186
1f0a95e4 187# For vbetest.mod.
188vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
189vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
59b8208a 190vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
6a85ce79 191
41730ed9 192# For play.mod.
193play_mod_SOURCES = commands/i386/pc/play.c
194play_mod_CFLAGS = $(COMMON_CFLAGS)
195play_mod_LDFLAGS = $(COMMON_LDFLAGS)
196
bd0d7896 197# For video.mod.
198video_mod_SOURCES = video/video.c
199video_mod_CFLAGS = $(COMMON_CFLAGS)
200video_mod_LDFLAGS = $(COMMON_LDFLAGS)
201
202# For gfxterm.mod.
203gfxterm_mod_SOURCES = term/gfxterm.c
204gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
205gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
206
207# For videotest.mod.
208videotest_mod_SOURCES = commands/videotest.c
209videotest_mod_CFLAGS = $(COMMON_CFLAGS)
210videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
211
ad2a06ed 212# For bitmap.mod
213bitmap_mod_SOURCES = video/bitmap.c
214bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
215bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
216
217# For tga.mod
218tga_mod_SOURCES = video/readers/tga.c
219tga_mod_CFLAGS = $(COMMON_CFLAGS)
220tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
221
233b1628 222include $(srcdir)/conf/common.mk