2002-12-27 08:53:07 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
COMMON_ASFLAGS = -nostdinc -fno-builtin
|
2002-12-28 07:16:30 +00:00
|
|
|
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
# Images.
|
|
|
|
pkgdata_IMAGES = boot.img diskboot.img kernel.img
|
|
|
|
|
|
|
|
# For boot.img.
|
|
|
|
boot_img_SOURCES = boot/i386/pc/boot.S
|
|
|
|
boot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
|
|
|
|
|
|
|
|
# For diskboot.img.
|
|
|
|
diskboot_img_SOURCES = boot/i386/pc/diskboot.S
|
|
|
|
diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000
|
|
|
|
|
|
|
|
# For kernel.img.
|
|
|
|
kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
|
|
|
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
|
|
kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
|
|
|
|
kern/i386/dl.c kern/i386/pc/init.c disk/i386/pc/partition.c \
|
|
|
|
disk/i386/pc/biosdisk.c \
|
|
|
|
term/i386/pc/console.c \
|
|
|
|
symlist.c
|
|
|
|
kernel_img_HEADERS = boot.h device.h disk.h dl.h elf.h err.h \
|
|
|
|
file.h fs.h kernel.h loader.h misc.h mm.h net.h rescue.h symbol.h \
|
|
|
|
term.h types.h machine/biosdisk.h machine/boot.h \
|
|
|
|
machine/console.h machine/init.h machine/memory.h \
|
2003-09-25 20:15:53 +00:00
|
|
|
machine/loader.h machine/partition.h machine/vga.h
|
2002-12-27 08:53:07 +00:00
|
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200
|
|
|
|
|
|
|
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
|
|
DEFSYMFILES += kernel_syms.lst
|
|
|
|
|
|
|
|
symlist.c: $(addprefix include/pupa/,$(kernel_img_HEADERS)) gensymlist.sh
|
|
|
|
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
|
|
|
|
|
|
|
kernel_syms.lst: $(addprefix include/pupa/,$(kernel_img_HEADERS)) genkernsyms.sh
|
|
|
|
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
|
|
|
|
|
|
|
# Utilities.
|
|
|
|
bin_UTILITIES = pupa-mkimage
|
2003-11-17 18:07:09 +00:00
|
|
|
sbin_UTILITIES = pupa-setup pupa-emu
|
2002-12-27 08:53:07 +00:00
|
|
|
noinst_UTILITIES = genmoddep
|
|
|
|
|
|
|
|
# For pupa-mkimage.
|
|
|
|
pupa_mkimage_SOURCES = util/i386/pc/pupa-mkimage.c util/misc.c \
|
|
|
|
util/resolve.c
|
2003-01-31 03:26:56 +00:00
|
|
|
pupa_mkimage_LDFLAGS = -llzo
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2003-01-02 20:12:33 +00:00
|
|
|
# For pupa-setup.
|
|
|
|
pupa_setup_SOURCES = util/i386/pc/pupa-setup.c util/i386/pc/biosdisk.c \
|
2003-11-17 18:07:09 +00:00
|
|
|
util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
|
|
|
|
kern/err.c kern/misc.c disk/i386/pc/partition.c fs/fat.c fs/ext2.c \
|
|
|
|
kern/file.c kern/fs.c
|
|
|
|
|
|
|
|
# For pupa
|
|
|
|
pupa_emu_SOURCES = kern/main.c kern/device.c \
|
|
|
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
|
|
kern/misc.c kern/loader.c kern/rescue.c kern/term.c \
|
|
|
|
disk/i386/pc/partition.c \
|
|
|
|
util/i386/pc/biosdisk.c fs/fat.c fs/ext2.c \
|
|
|
|
normal/cmdline.c normal/command.c normal/main.c normal/menu.c \
|
|
|
|
util/console.c util/pupa-emu.c util/misc.c util/i386/pc/getroot.c
|
|
|
|
pupa_emu_LDFLAGS = -lncurses
|
2003-01-02 20:12:33 +00:00
|
|
|
|
2002-12-27 08:53:07 +00:00
|
|
|
# For genmoddep.
|
|
|
|
genmoddep_SOURCES = util/genmoddep.c
|
|
|
|
|
|
|
|
# Modules.
|
2003-10-29 18:44:30 +00:00
|
|
|
pkgdata_MODULES = _chain.mod _linux.mod fat.mod ext2.mod normal.mod hello.mod \
|
2003-11-16 16:36:39 +00:00
|
|
|
vga.mod font.mod _multiboot.mod
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2003-01-20 04:13:46 +00:00
|
|
|
# For _chain.mod.
|
|
|
|
_chain_mod_SOURCES = loader/i386/pc/chainloader.c
|
|
|
|
_chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
# For fat.mod.
|
|
|
|
fat_mod_SOURCES = fs/fat.c
|
|
|
|
fat_mod_CFLAGS = $(COMMON_CFLAGS)
|
2003-01-17 02:52:05 +00:00
|
|
|
|
2003-10-29 18:44:30 +00:00
|
|
|
# For ext2.mod.
|
|
|
|
ext2_mod_SOURCES = fs/ext2.c
|
|
|
|
ext2_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
|
2003-01-20 04:13:46 +00:00
|
|
|
# For _linux.mod.
|
|
|
|
_linux_mod_SOURCES = loader/i386/pc/linux.c
|
|
|
|
_linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
|
|
|
|
# For normal.mod.
|
|
|
|
normal_mod_SOURCES = normal/cmdline.c normal/command.c normal/main.c \
|
|
|
|
normal/menu.c normal/i386/setjmp.S
|
|
|
|
normal_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
2003-02-08 08:15:43 +00:00
|
|
|
|
|
|
|
# For hello.mod.
|
|
|
|
hello_mod_SOURCES = hello/hello.c
|
|
|
|
hello_mod_CFLAGS = $(COMMON_CFLAGS)
|
2003-09-25 20:15:53 +00:00
|
|
|
|
|
|
|
# For vga.mod.
|
|
|
|
vga_mod_SOURCES = term/i386/pc/vga.c
|
|
|
|
vga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
|
|
|
|
# For font.mod.
|
|
|
|
font_mod_SOURCES = font/manager.c
|
|
|
|
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
2003-11-16 16:36:39 +00:00
|
|
|
|
|
|
|
# For _multiboot.mod.
|
|
|
|
_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
|
|
|
|
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|