grub/conf/i386-pc.mk
marco_g db1771cfbe 2004-03-14 Marco Gerards <metgerards@student.han.nl>
* commands/boot.c: New file.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/terminal.c: Likewise.
	* normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
	(pupa_register_command): Changed interface to match the new
	argument parser.
	(pupa_command_execute): Changed (almost rewritten) so it uses
	pupa_split_command.  Added support for setting variables using the
	syntax `foo=bar'.
	(rescue_command): Changed to work with the new argument parser.
	(terminal_command): Moved from here to commands/terminal.c.
	(set_command): New function.
	(unset_command): New function.
	(insmod_command): New function.
	(rmmod_command): New function.
	(lsmod_command): New function.
	(pupa_command_init): Don't initialize the command terminal
	anymore.  Initialize the commands set, unset, insmod, rmmod and
	lsmod.
	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
	(kernel_img_HEADERS): Add arg.h and env.h.
	(pupa_mkimage_LDFLAGS): Add kern/env.c.
	(pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
	commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
	normal/arg.c.
	(pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
	terminal.mod.
	(normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
	(boot_mod_SOURCES): New variable.
	(terminal_mod_SOURCES): Likewise.
	(ls_mod_SOURCES): Likewise.
	(cmp_mod_SOURCES): Likewise.
	(cat_mod_SOURCES): Likewise.

	* normal/arg.c: New file.
	* kern/env.c: Likewise.
	* include/pupa/arg.h: Likewise.
	* include/pupa/env.h: Likewise.
	* font/manager.c (font_command): Changed to match argument parsing
	interface changes.
	(PUPA_MOD_INIT): Likewise.
	* hello/hello.c (pupa_cmd_hello): Likewise.
	(PUPA_MOD_INIT): Likewise.
	* include/pupa/disk.h: Include <pupa/device.h>.
	(pupa_print_partinfo): New prototype.
	* include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
	(pupa_dl_get_prefix): Likewise.
	* include/pupa/misc.h: Include <pupa/err.h>.
	(pupa_isgraph): New prototype.
	(pupa_isdigit): Likewise.
	(pupa_split_cmdline): Likewise.
	* include/pupa/normal.h: Include <pupa/arg.h>.
	(pupa_command): Changed the prototype of the member `func' to
	match the argument parsing interface.  Added member `options'.
	(pupa_register_command): Updated to match function.
	(pupa_arg_parse): New prototype.
	(pupa_hello_init) [PUPA_UTIL]: New prototype.
	(pupa_hello_fini) [PUPA_UTIL]: Likewise.
	(pupa_ls_init) [PUPA_UTIL]: Likewise.
	(pupa_ls_fini) [PUPA_UTIL]: Likewise.
	(pupa_cat_init) [PUPA_UTIL]: Likewise.
	(pupa_cat_fini) [PUPA_UTIL]: Likewise.
	(pupa_boot_init) [PUPA_UTIL]: Likewise.
	(pupa_boot_fini) [PUPA_UTIL]: Likewise.
	(pupa_cmp_init) [PUPA_UTIL]: Likewise.
	(pupa_cmp_fini) [PUPA_UTIL]: Likewise.
	(pupa_terminal_init) [PUPA_UTIL]: Likewise.
	(pupa_terminal_fini) [PUPA_UTIL]: Likewise.
	* kern/disk.c: Include <pupa/file.h>.
	(pupa_print_partinfo): New function.
	* kern/dl.c: Include <pupa/env.h>.
	(pupa_dl_dir): Variable removed.
	(pupa_dl_load): Use the environment variable `prefix' instead of
	the variable pupa_dl_dir.
	(pupa_dl_set_prefix): Function removed.
	(pupa_dl_get_prefix): Likewise.
	* kern/i386/pc/init.c: Include <pupa/env.h>.
	(pupa_machine_init): Use the environment variable `prefix' instead of
	using pupa_dl_set_prefix to set the prefix.
	* kern/main.c: Include <pupa/env.h>.
	(pupa_set_root_dev): Use the environment variable `prefix' instead of
	using pupa_dl_get_prefix to get the prefix.
	* kern/misc.c: Include <pupa/env.h>.
	(pupa_isdigit): New function.
	(pupa_isgraph): Likewise.
	(pupa_ftoa): Likewise.
	(pupa_vsprintf): Added support for printing values of the type
	`double'.  Make it possible to format variable output when using
	formatting like `%1.2%f'.
	(pupa_split_cmdline): New function.
	* kern/rescue.c: Include <pupa/env.h>.
	(next_word): Removed function.
	(pupa_rescue_cmd_prefix): Likewise.
	(pupa_rescue_cmd_set): New function.
	(pupa_rescue_cmd_unset): New function.
	(pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
	split the command line instead of splitting it here.  Added
	support for setting variables using the syntax `foo=bar'.  Don't
	initialize the prefix command anymore.  Initialized the set and
	unset commands.
	* normal/cmdline.c: Include <pupa/env.h>.
	(pupa_tab_complete): Added prototypes for print_simple_completion,
	print_partition_completion, add_completion, iterate_commands,
	iterate_dev, iterate_part and iterate_dir. Moved code to print
	partition information from here to kern/disk.c.
	(pupa_cmdline_run): Don't check if the funtion exists anymore.
	* normal/main.c: Include <pupa/env.h>.
	(pupa_rescue_cmd_normal): Use the environment variable `prefix'
	instead of using pupa_dl_get_prefix to get the prefix.
	* term/i386/pc/vga.c: Include <pupa/arg.h>.
	(check_vga_mem): Cast pointers to `void *' to silence a gcc
	warning.
	(pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
	(pupa_vga_setcolor): Declare unused variables with `__attribute__
	((unused))' to silence a gcc warning.
	(pupa_vga_setcolor): Likewise.
	(debug_command): Changed to match argument parsing
	interface changes.
	* util/pupa-emu.c: Include <pupa/env.h>.
	(options): Added 0's for unused fields to silence a gcc warning.
	(argp): Likewise.
	(main): Use the environment variable `prefix' instead of using
	pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
	boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
	and terminal.

	* util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
	* util/misc.c: Include <malloc.h>.
	(pupa_malloc): Rewritten so errors are correctly reported.
	(pupa_realloc): Likewise.
	(pupa_memalign): Likewise.
	(pupa_mm_init_region): Declare unused variables with
	`__attribute__ ((unused))' to silence a gcc warning.
	* normal/i386/setjmp.S: Remove tab at the end of the file to
	silence a gcc warning.
	* loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
	variables with `__attribute__ ((unused))' to silence a gcc
	warning.
	* loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
	local variable i unsigned to silence a gcc warning.

	* kern/term.c: Include <pupa/misc.h>.
	(pupa_more_lines): New variable.
	(pupa_more): Likewise.
	(pupa_putcode): When the pager is active pause at the end of every
	screen.
	(pupa_set_more): New function.
	* include/pupa/term.h (pupa_set_more): New prototype.
2004-03-13 13:59:25 +00:00

1281 lines
60 KiB
Makefile

# -*- makefile -*-
COMMON_ASFLAGS = -nostdinc -fno-builtin
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3
# Images.
pkgdata_IMAGES = boot.img diskboot.img kernel.img
# For boot.img.
boot_img_SOURCES = boot/i386/pc/boot.S
CLEANFILES += boot.img boot.exec boot_img-boot_i386_pc_boot.o
MOSTLYCLEANFILES += boot_img-boot_i386_pc_boot.d
boot.img: boot.exec
$(OBJCOPY) -O binary -R .note -R .comment $< $@
boot.exec: boot_img-boot_i386_pc_boot.o
$(CC) -o $@ $^ $(LDFLAGS) $(boot_img_LDFLAGS)
boot_img-boot_i386_pc_boot.o: boot/i386/pc/boot.S
$(CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(boot_img_ASFLAGS) -c -o $@ $<
boot_img-boot_i386_pc_boot.d: boot/i386/pc/boot.S
set -e; $(CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(boot_img_ASFLAGS) -M $< | sed 's,boot\.o[ :]*,boot_img-boot_i386_pc_boot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include boot_img-boot_i386_pc_boot.d
boot_img_ASFLAGS = $(COMMON_ASFLAGS)
boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
# For diskboot.img.
diskboot_img_SOURCES = boot/i386/pc/diskboot.S
CLEANFILES += diskboot.img diskboot.exec diskboot_img-boot_i386_pc_diskboot.o
MOSTLYCLEANFILES += diskboot_img-boot_i386_pc_diskboot.d
diskboot.img: diskboot.exec
$(OBJCOPY) -O binary -R .note -R .comment $< $@
diskboot.exec: diskboot_img-boot_i386_pc_diskboot.o
$(CC) -o $@ $^ $(LDFLAGS) $(diskboot_img_LDFLAGS)
diskboot_img-boot_i386_pc_diskboot.o: boot/i386/pc/diskboot.S
$(CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(diskboot_img_ASFLAGS) -c -o $@ $<
diskboot_img-boot_i386_pc_diskboot.d: boot/i386/pc/diskboot.S
set -e; $(CC) -Iboot/i386/pc -I$(srcdir)/boot/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(diskboot_img_ASFLAGS) -M $< | sed 's,diskboot\.o[ :]*,diskboot_img-boot_i386_pc_diskboot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include diskboot_img-boot_i386_pc_diskboot.d
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 \
kern/env.c disk/i386/pc/biosdisk.c \
term/i386/pc/console.c \
symlist.c
CLEANFILES += kernel.img kernel.exec kernel_img-kern_i386_pc_startup.o kernel_img-kern_main.o kernel_img-kern_device.o kernel_img-kern_disk.o kernel_img-kern_dl.o kernel_img-kern_file.o kernel_img-kern_fs.o kernel_img-kern_err.o kernel_img-kern_misc.o kernel_img-kern_mm.o kernel_img-kern_loader.o kernel_img-kern_rescue.o kernel_img-kern_term.o kernel_img-kern_i386_dl.o kernel_img-kern_i386_pc_init.o kernel_img-disk_i386_pc_partition.o kernel_img-kern_env.o kernel_img-disk_i386_pc_biosdisk.o kernel_img-term_i386_pc_console.o kernel_img-symlist.o
MOSTLYCLEANFILES += kernel_img-kern_i386_pc_startup.d kernel_img-kern_main.d kernel_img-kern_device.d kernel_img-kern_disk.d kernel_img-kern_dl.d kernel_img-kern_file.d kernel_img-kern_fs.d kernel_img-kern_err.d kernel_img-kern_misc.d kernel_img-kern_mm.d kernel_img-kern_loader.d kernel_img-kern_rescue.d kernel_img-kern_term.d kernel_img-kern_i386_dl.d kernel_img-kern_i386_pc_init.d kernel_img-disk_i386_pc_partition.d kernel_img-kern_env.d kernel_img-disk_i386_pc_biosdisk.d kernel_img-term_i386_pc_console.d kernel_img-symlist.d
kernel.img: kernel.exec
$(OBJCOPY) -O binary -R .note -R .comment $< $@
kernel.exec: kernel_img-kern_i386_pc_startup.o kernel_img-kern_main.o kernel_img-kern_device.o kernel_img-kern_disk.o kernel_img-kern_dl.o kernel_img-kern_file.o kernel_img-kern_fs.o kernel_img-kern_err.o kernel_img-kern_misc.o kernel_img-kern_mm.o kernel_img-kern_loader.o kernel_img-kern_rescue.o kernel_img-kern_term.o kernel_img-kern_i386_dl.o kernel_img-kern_i386_pc_init.o kernel_img-disk_i386_pc_partition.o kernel_img-kern_env.o kernel_img-disk_i386_pc_biosdisk.o kernel_img-term_i386_pc_console.o kernel_img-symlist.o
$(CC) -o $@ $^ $(LDFLAGS) $(kernel_img_LDFLAGS)
kernel_img-kern_i386_pc_startup.o: kern/i386/pc/startup.S
$(CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(kernel_img_ASFLAGS) -c -o $@ $<
kernel_img-kern_i386_pc_startup.d: kern/i386/pc/startup.S
set -e; $(CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(CPPFLAGS) -DASM_FILE=1 $(ASFLAGS) $(kernel_img_ASFLAGS) -M $< | sed 's,startup\.o[ :]*,kernel_img-kern_i386_pc_startup.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_i386_pc_startup.d
kernel_img-kern_main.o: kern/main.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_main.d: kern/main.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,main\.o[ :]*,kernel_img-kern_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_main.d
kernel_img-kern_device.o: kern/device.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_device.d: kern/device.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,device\.o[ :]*,kernel_img-kern_device.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_device.d
kernel_img-kern_disk.o: kern/disk.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_disk.d: kern/disk.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,disk\.o[ :]*,kernel_img-kern_disk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_disk.d
kernel_img-kern_dl.o: kern/dl.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_dl.d: kern/dl.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,dl\.o[ :]*,kernel_img-kern_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_dl.d
kernel_img-kern_file.o: kern/file.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_file.d: kern/file.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,file\.o[ :]*,kernel_img-kern_file.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_file.d
kernel_img-kern_fs.o: kern/fs.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_fs.d: kern/fs.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,fs\.o[ :]*,kernel_img-kern_fs.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_fs.d
kernel_img-kern_err.o: kern/err.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_err.d: kern/err.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,err\.o[ :]*,kernel_img-kern_err.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_err.d
kernel_img-kern_misc.o: kern/misc.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_misc.d: kern/misc.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,misc\.o[ :]*,kernel_img-kern_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_misc.d
kernel_img-kern_mm.o: kern/mm.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_mm.d: kern/mm.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,mm\.o[ :]*,kernel_img-kern_mm.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_mm.d
kernel_img-kern_loader.o: kern/loader.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_loader.d: kern/loader.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,loader\.o[ :]*,kernel_img-kern_loader.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_loader.d
kernel_img-kern_rescue.o: kern/rescue.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_rescue.d: kern/rescue.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,rescue\.o[ :]*,kernel_img-kern_rescue.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_rescue.d
kernel_img-kern_term.o: kern/term.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_term.d: kern/term.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,term\.o[ :]*,kernel_img-kern_term.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_term.d
kernel_img-kern_i386_dl.o: kern/i386/dl.c
$(CC) -Ikern/i386 -I$(srcdir)/kern/i386 $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_i386_dl.d: kern/i386/dl.c
set -e; $(CC) -Ikern/i386 -I$(srcdir)/kern/i386 $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,dl\.o[ :]*,kernel_img-kern_i386_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_i386_dl.d
kernel_img-kern_i386_pc_init.o: kern/i386/pc/init.c
$(CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_i386_pc_init.d: kern/i386/pc/init.c
set -e; $(CC) -Ikern/i386/pc -I$(srcdir)/kern/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,init\.o[ :]*,kernel_img-kern_i386_pc_init.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_i386_pc_init.d
kernel_img-disk_i386_pc_partition.o: disk/i386/pc/partition.c
$(CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-disk_i386_pc_partition.d: disk/i386/pc/partition.c
set -e; $(CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,partition\.o[ :]*,kernel_img-disk_i386_pc_partition.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-disk_i386_pc_partition.d
kernel_img-kern_env.o: kern/env.c
$(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-kern_env.d: kern/env.c
set -e; $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,env\.o[ :]*,kernel_img-kern_env.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-kern_env.d
kernel_img-disk_i386_pc_biosdisk.o: disk/i386/pc/biosdisk.c
$(CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-disk_i386_pc_biosdisk.d: disk/i386/pc/biosdisk.c
set -e; $(CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,biosdisk\.o[ :]*,kernel_img-disk_i386_pc_biosdisk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-disk_i386_pc_biosdisk.d
kernel_img-term_i386_pc_console.o: term/i386/pc/console.c
$(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-term_i386_pc_console.d: term/i386/pc/console.c
set -e; $(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,console\.o[ :]*,kernel_img-term_i386_pc_console.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-term_i386_pc_console.d
kernel_img-symlist.o: symlist.c
$(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -c -o $@ $<
kernel_img-symlist.d: symlist.c
set -e; $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) $(kernel_img_CFLAGS) -M $< | sed 's,symlist\.o[ :]*,kernel_img-symlist.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include kernel_img-symlist.d
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 \
machine/loader.h machine/partition.h machine/vga.h arg.h env.h
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
sbin_UTILITIES = pupa-setup pupa-emu
noinst_UTILITIES = genmoddep
# For pupa-mkimage.
pupa_mkimage_SOURCES = util/i386/pc/pupa-mkimage.c util/misc.c \
util/resolve.c
CLEANFILES += pupa-mkimage pupa_mkimage-util_i386_pc_pupa_mkimage.o pupa_mkimage-util_misc.o pupa_mkimage-util_resolve.o
MOSTLYCLEANFILES += pupa_mkimage-util_i386_pc_pupa_mkimage.d pupa_mkimage-util_misc.d pupa_mkimage-util_resolve.d
pupa-mkimage: pupa_mkimage-util_i386_pc_pupa_mkimage.o pupa_mkimage-util_misc.o pupa_mkimage-util_resolve.o
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(pupa_mkimage_LDFLAGS)
pupa_mkimage-util_i386_pc_pupa_mkimage.o: util/i386/pc/pupa-mkimage.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -c -o $@ $<
pupa_mkimage-util_i386_pc_pupa_mkimage.d: util/i386/pc/pupa-mkimage.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -M $< | sed 's,pupa\-mkimage\.o[ :]*,pupa_mkimage-util_i386_pc_pupa_mkimage.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_mkimage-util_i386_pc_pupa_mkimage.d
pupa_mkimage-util_misc.o: util/misc.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -c -o $@ $<
pupa_mkimage-util_misc.d: util/misc.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -M $< | sed 's,misc\.o[ :]*,pupa_mkimage-util_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_mkimage-util_misc.d
pupa_mkimage-util_resolve.o: util/resolve.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -c -o $@ $<
pupa_mkimage-util_resolve.d: util/resolve.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_mkimage_CFLAGS) -M $< | sed 's,resolve\.o[ :]*,pupa_mkimage-util_resolve.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_mkimage-util_resolve.d
pupa_mkimage_LDFLAGS = -llzo
# For pupa-setup.
pupa_setup_SOURCES = util/i386/pc/pupa-setup.c util/i386/pc/biosdisk.c \
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 kern/env.c
CLEANFILES += pupa-setup pupa_setup-util_i386_pc_pupa_setup.o pupa_setup-util_i386_pc_biosdisk.o pupa_setup-util_misc.o pupa_setup-util_i386_pc_getroot.o pupa_setup-kern_device.o pupa_setup-kern_disk.o pupa_setup-kern_err.o pupa_setup-kern_misc.o pupa_setup-disk_i386_pc_partition.o pupa_setup-fs_fat.o pupa_setup-fs_ext2.o pupa_setup-kern_file.o pupa_setup-kern_fs.o pupa_setup-kern_env.o
MOSTLYCLEANFILES += pupa_setup-util_i386_pc_pupa_setup.d pupa_setup-util_i386_pc_biosdisk.d pupa_setup-util_misc.d pupa_setup-util_i386_pc_getroot.d pupa_setup-kern_device.d pupa_setup-kern_disk.d pupa_setup-kern_err.d pupa_setup-kern_misc.d pupa_setup-disk_i386_pc_partition.d pupa_setup-fs_fat.d pupa_setup-fs_ext2.d pupa_setup-kern_file.d pupa_setup-kern_fs.d pupa_setup-kern_env.d
pupa-setup: pupa_setup-util_i386_pc_pupa_setup.o pupa_setup-util_i386_pc_biosdisk.o pupa_setup-util_misc.o pupa_setup-util_i386_pc_getroot.o pupa_setup-kern_device.o pupa_setup-kern_disk.o pupa_setup-kern_err.o pupa_setup-kern_misc.o pupa_setup-disk_i386_pc_partition.o pupa_setup-fs_fat.o pupa_setup-fs_ext2.o pupa_setup-kern_file.o pupa_setup-kern_fs.o pupa_setup-kern_env.o
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(pupa_setup_LDFLAGS)
pupa_setup-util_i386_pc_pupa_setup.o: util/i386/pc/pupa-setup.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-util_i386_pc_pupa_setup.d: util/i386/pc/pupa-setup.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,pupa\-setup\.o[ :]*,pupa_setup-util_i386_pc_pupa_setup.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-util_i386_pc_pupa_setup.d
pupa_setup-util_i386_pc_biosdisk.o: util/i386/pc/biosdisk.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-util_i386_pc_biosdisk.d: util/i386/pc/biosdisk.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,biosdisk\.o[ :]*,pupa_setup-util_i386_pc_biosdisk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-util_i386_pc_biosdisk.d
pupa_setup-util_misc.o: util/misc.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-util_misc.d: util/misc.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,misc\.o[ :]*,pupa_setup-util_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-util_misc.d
pupa_setup-util_i386_pc_getroot.o: util/i386/pc/getroot.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-util_i386_pc_getroot.d: util/i386/pc/getroot.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,getroot\.o[ :]*,pupa_setup-util_i386_pc_getroot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-util_i386_pc_getroot.d
pupa_setup-kern_device.o: kern/device.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_device.d: kern/device.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,device\.o[ :]*,pupa_setup-kern_device.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_device.d
pupa_setup-kern_disk.o: kern/disk.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_disk.d: kern/disk.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,disk\.o[ :]*,pupa_setup-kern_disk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_disk.d
pupa_setup-kern_err.o: kern/err.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_err.d: kern/err.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,err\.o[ :]*,pupa_setup-kern_err.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_err.d
pupa_setup-kern_misc.o: kern/misc.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_misc.d: kern/misc.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,misc\.o[ :]*,pupa_setup-kern_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_misc.d
pupa_setup-disk_i386_pc_partition.o: disk/i386/pc/partition.c
$(BUILD_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-disk_i386_pc_partition.d: disk/i386/pc/partition.c
set -e; $(BUILD_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,partition\.o[ :]*,pupa_setup-disk_i386_pc_partition.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-disk_i386_pc_partition.d
pupa_setup-fs_fat.o: fs/fat.c
$(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-fs_fat.d: fs/fat.c
set -e; $(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,fat\.o[ :]*,pupa_setup-fs_fat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-fs_fat.d
pupa_setup-fs_ext2.o: fs/ext2.c
$(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-fs_ext2.d: fs/ext2.c
set -e; $(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,ext2\.o[ :]*,pupa_setup-fs_ext2.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-fs_ext2.d
pupa_setup-kern_file.o: kern/file.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_file.d: kern/file.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,file\.o[ :]*,pupa_setup-kern_file.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_file.d
pupa_setup-kern_fs.o: kern/fs.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_fs.d: kern/fs.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,fs\.o[ :]*,pupa_setup-kern_fs.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_fs.d
pupa_setup-kern_env.o: kern/env.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -c -o $@ $<
pupa_setup-kern_env.d: kern/env.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_setup_CFLAGS) -M $< | sed 's,env\.o[ :]*,pupa_setup-kern_env.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_setup-kern_env.d
# 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 kern/env.c commands/ls.c \
commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c \
util/i386/pc/biosdisk.c fs/fat.c fs/ext2.c \
normal/cmdline.c normal/command.c normal/main.c normal/menu.c normal/arg.c \
util/console.c util/pupa-emu.c util/misc.c util/i386/pc/getroot.c
CLEANFILES += pupa-emu pupa_emu-kern_main.o pupa_emu-kern_device.o pupa_emu-kern_disk.o pupa_emu-kern_dl.o pupa_emu-kern_file.o pupa_emu-kern_fs.o pupa_emu-kern_err.o pupa_emu-kern_misc.o pupa_emu-kern_loader.o pupa_emu-kern_rescue.o pupa_emu-kern_term.o pupa_emu-disk_i386_pc_partition.o pupa_emu-kern_env.o pupa_emu-commands_ls.o pupa_emu-commands_terminal.o pupa_emu-commands_boot.o pupa_emu-commands_cmp.o pupa_emu-commands_cat.o pupa_emu-util_i386_pc_biosdisk.o pupa_emu-fs_fat.o pupa_emu-fs_ext2.o pupa_emu-normal_cmdline.o pupa_emu-normal_command.o pupa_emu-normal_main.o pupa_emu-normal_menu.o pupa_emu-normal_arg.o pupa_emu-util_console.o pupa_emu-util_pupa_emu.o pupa_emu-util_misc.o pupa_emu-util_i386_pc_getroot.o
MOSTLYCLEANFILES += pupa_emu-kern_main.d pupa_emu-kern_device.d pupa_emu-kern_disk.d pupa_emu-kern_dl.d pupa_emu-kern_file.d pupa_emu-kern_fs.d pupa_emu-kern_err.d pupa_emu-kern_misc.d pupa_emu-kern_loader.d pupa_emu-kern_rescue.d pupa_emu-kern_term.d pupa_emu-disk_i386_pc_partition.d pupa_emu-kern_env.d pupa_emu-commands_ls.d pupa_emu-commands_terminal.d pupa_emu-commands_boot.d pupa_emu-commands_cmp.d pupa_emu-commands_cat.d pupa_emu-util_i386_pc_biosdisk.d pupa_emu-fs_fat.d pupa_emu-fs_ext2.d pupa_emu-normal_cmdline.d pupa_emu-normal_command.d pupa_emu-normal_main.d pupa_emu-normal_menu.d pupa_emu-normal_arg.d pupa_emu-util_console.d pupa_emu-util_pupa_emu.d pupa_emu-util_misc.d pupa_emu-util_i386_pc_getroot.d
pupa-emu: pupa_emu-kern_main.o pupa_emu-kern_device.o pupa_emu-kern_disk.o pupa_emu-kern_dl.o pupa_emu-kern_file.o pupa_emu-kern_fs.o pupa_emu-kern_err.o pupa_emu-kern_misc.o pupa_emu-kern_loader.o pupa_emu-kern_rescue.o pupa_emu-kern_term.o pupa_emu-disk_i386_pc_partition.o pupa_emu-kern_env.o pupa_emu-commands_ls.o pupa_emu-commands_terminal.o pupa_emu-commands_boot.o pupa_emu-commands_cmp.o pupa_emu-commands_cat.o pupa_emu-util_i386_pc_biosdisk.o pupa_emu-fs_fat.o pupa_emu-fs_ext2.o pupa_emu-normal_cmdline.o pupa_emu-normal_command.o pupa_emu-normal_main.o pupa_emu-normal_menu.o pupa_emu-normal_arg.o pupa_emu-util_console.o pupa_emu-util_pupa_emu.o pupa_emu-util_misc.o pupa_emu-util_i386_pc_getroot.o
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(pupa_emu_LDFLAGS)
pupa_emu-kern_main.o: kern/main.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_main.d: kern/main.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,main\.o[ :]*,pupa_emu-kern_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_main.d
pupa_emu-kern_device.o: kern/device.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_device.d: kern/device.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,device\.o[ :]*,pupa_emu-kern_device.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_device.d
pupa_emu-kern_disk.o: kern/disk.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_disk.d: kern/disk.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,disk\.o[ :]*,pupa_emu-kern_disk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_disk.d
pupa_emu-kern_dl.o: kern/dl.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_dl.d: kern/dl.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,dl\.o[ :]*,pupa_emu-kern_dl.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_dl.d
pupa_emu-kern_file.o: kern/file.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_file.d: kern/file.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,file\.o[ :]*,pupa_emu-kern_file.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_file.d
pupa_emu-kern_fs.o: kern/fs.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_fs.d: kern/fs.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,fs\.o[ :]*,pupa_emu-kern_fs.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_fs.d
pupa_emu-kern_err.o: kern/err.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_err.d: kern/err.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,err\.o[ :]*,pupa_emu-kern_err.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_err.d
pupa_emu-kern_misc.o: kern/misc.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_misc.d: kern/misc.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,misc\.o[ :]*,pupa_emu-kern_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_misc.d
pupa_emu-kern_loader.o: kern/loader.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_loader.d: kern/loader.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,loader\.o[ :]*,pupa_emu-kern_loader.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_loader.d
pupa_emu-kern_rescue.o: kern/rescue.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_rescue.d: kern/rescue.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,rescue\.o[ :]*,pupa_emu-kern_rescue.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_rescue.d
pupa_emu-kern_term.o: kern/term.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_term.d: kern/term.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,term\.o[ :]*,pupa_emu-kern_term.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_term.d
pupa_emu-disk_i386_pc_partition.o: disk/i386/pc/partition.c
$(BUILD_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-disk_i386_pc_partition.d: disk/i386/pc/partition.c
set -e; $(BUILD_CC) -Idisk/i386/pc -I$(srcdir)/disk/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,partition\.o[ :]*,pupa_emu-disk_i386_pc_partition.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-disk_i386_pc_partition.d
pupa_emu-kern_env.o: kern/env.c
$(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-kern_env.d: kern/env.c
set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,env\.o[ :]*,pupa_emu-kern_env.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-kern_env.d
pupa_emu-commands_ls.o: commands/ls.c
$(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-commands_ls.d: commands/ls.c
set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,ls\.o[ :]*,pupa_emu-commands_ls.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-commands_ls.d
pupa_emu-commands_terminal.o: commands/terminal.c
$(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-commands_terminal.d: commands/terminal.c
set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,terminal\.o[ :]*,pupa_emu-commands_terminal.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-commands_terminal.d
pupa_emu-commands_boot.o: commands/boot.c
$(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-commands_boot.d: commands/boot.c
set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,boot\.o[ :]*,pupa_emu-commands_boot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-commands_boot.d
pupa_emu-commands_cmp.o: commands/cmp.c
$(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-commands_cmp.d: commands/cmp.c
set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,cmp\.o[ :]*,pupa_emu-commands_cmp.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-commands_cmp.d
pupa_emu-commands_cat.o: commands/cat.c
$(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-commands_cat.d: commands/cat.c
set -e; $(BUILD_CC) -Icommands -I$(srcdir)/commands $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,cat\.o[ :]*,pupa_emu-commands_cat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-commands_cat.d
pupa_emu-util_i386_pc_biosdisk.o: util/i386/pc/biosdisk.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-util_i386_pc_biosdisk.d: util/i386/pc/biosdisk.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,biosdisk\.o[ :]*,pupa_emu-util_i386_pc_biosdisk.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-util_i386_pc_biosdisk.d
pupa_emu-fs_fat.o: fs/fat.c
$(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-fs_fat.d: fs/fat.c
set -e; $(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,fat\.o[ :]*,pupa_emu-fs_fat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-fs_fat.d
pupa_emu-fs_ext2.o: fs/ext2.c
$(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-fs_ext2.d: fs/ext2.c
set -e; $(BUILD_CC) -Ifs -I$(srcdir)/fs $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,ext2\.o[ :]*,pupa_emu-fs_ext2.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-fs_ext2.d
pupa_emu-normal_cmdline.o: normal/cmdline.c
$(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-normal_cmdline.d: normal/cmdline.c
set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,cmdline\.o[ :]*,pupa_emu-normal_cmdline.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-normal_cmdline.d
pupa_emu-normal_command.o: normal/command.c
$(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-normal_command.d: normal/command.c
set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,command\.o[ :]*,pupa_emu-normal_command.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-normal_command.d
pupa_emu-normal_main.o: normal/main.c
$(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-normal_main.d: normal/main.c
set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,main\.o[ :]*,pupa_emu-normal_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-normal_main.d
pupa_emu-normal_menu.o: normal/menu.c
$(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-normal_menu.d: normal/menu.c
set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,menu\.o[ :]*,pupa_emu-normal_menu.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-normal_menu.d
pupa_emu-normal_arg.o: normal/arg.c
$(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-normal_arg.d: normal/arg.c
set -e; $(BUILD_CC) -Inormal -I$(srcdir)/normal $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,arg\.o[ :]*,pupa_emu-normal_arg.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-normal_arg.d
pupa_emu-util_console.o: util/console.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-util_console.d: util/console.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,console\.o[ :]*,pupa_emu-util_console.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-util_console.d
pupa_emu-util_pupa_emu.o: util/pupa-emu.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-util_pupa_emu.d: util/pupa-emu.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,pupa\-emu\.o[ :]*,pupa_emu-util_pupa_emu.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-util_pupa_emu.d
pupa_emu-util_misc.o: util/misc.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-util_misc.d: util/misc.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,misc\.o[ :]*,pupa_emu-util_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-util_misc.d
pupa_emu-util_i386_pc_getroot.o: util/i386/pc/getroot.c
$(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -c -o $@ $<
pupa_emu-util_i386_pc_getroot.d: util/i386/pc/getroot.c
set -e; $(BUILD_CC) -Iutil/i386/pc -I$(srcdir)/util/i386/pc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(pupa_emu_CFLAGS) -M $< | sed 's,getroot\.o[ :]*,pupa_emu-util_i386_pc_getroot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include pupa_emu-util_i386_pc_getroot.d
pupa_emu_LDFLAGS = -lncurses
# For genmoddep.
genmoddep_SOURCES = util/genmoddep.c
CLEANFILES += genmoddep genmoddep-util_genmoddep.o
MOSTLYCLEANFILES += genmoddep-util_genmoddep.d
genmoddep: genmoddep-util_genmoddep.o
$(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(genmoddep_LDFLAGS)
genmoddep-util_genmoddep.o: util/genmoddep.c
$(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(genmoddep_CFLAGS) -c -o $@ $<
genmoddep-util_genmoddep.d: util/genmoddep.c
set -e; $(BUILD_CC) -Iutil -I$(srcdir)/util $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DPUPA_UTIL=1 $(genmoddep_CFLAGS) -M $< | sed 's,genmoddep\.o[ :]*,genmoddep-util_genmoddep.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include genmoddep-util_genmoddep.d
# Modules.
pkgdata_MODULES = _chain.mod _linux.mod fat.mod ext2.mod normal.mod hello.mod \
vga.mod font.mod _multiboot.mod ls.mod boot.mod cmp.mod cat.mod terminal.mod
# For _chain.mod.
_chain_mod_SOURCES = loader/i386/pc/chainloader.c
CLEANFILES += _chain.mod mod-_chain.o mod-_chain.c pre-_chain.o _chain_mod-loader_i386_pc_chainloader.o def-_chain.lst und-_chain.lst
MOSTLYCLEANFILES += _chain_mod-loader_i386_pc_chainloader.d
DEFSYMFILES += def-_chain.lst
UNDSYMFILES += und-_chain.lst
_chain.mod: pre-_chain.o mod-_chain.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-_chain.o: _chain_mod-loader_i386_pc_chainloader.o
-rm -f $@
$(LD) -r -o $@ $^
mod-_chain.o: mod-_chain.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(_chain_mod_CFLAGS) -c -o $@ $<
mod-_chain.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh '_chain' $< > $@ || (rm -f $@; exit 1)
def-_chain.lst: pre-_chain.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _chain/' > $@
und-_chain.lst: pre-_chain.o
echo '_chain' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
_chain_mod-loader_i386_pc_chainloader.o: loader/i386/pc/chainloader.c
$(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_chain_mod_CFLAGS) -c -o $@ $<
_chain_mod-loader_i386_pc_chainloader.d: loader/i386/pc/chainloader.c
set -e; $(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_chain_mod_CFLAGS) -M $< | sed 's,chainloader\.o[ :]*,_chain_mod-loader_i386_pc_chainloader.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include _chain_mod-loader_i386_pc_chainloader.d
_chain_mod_CFLAGS = $(COMMON_CFLAGS)
# For fat.mod.
fat_mod_SOURCES = fs/fat.c
CLEANFILES += fat.mod mod-fat.o mod-fat.c pre-fat.o fat_mod-fs_fat.o def-fat.lst und-fat.lst
MOSTLYCLEANFILES += fat_mod-fs_fat.d
DEFSYMFILES += def-fat.lst
UNDSYMFILES += und-fat.lst
fat.mod: pre-fat.o mod-fat.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-fat.o: fat_mod-fs_fat.o
-rm -f $@
$(LD) -r -o $@ $^
mod-fat.o: mod-fat.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(fat_mod_CFLAGS) -c -o $@ $<
mod-fat.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'fat' $< > $@ || (rm -f $@; exit 1)
def-fat.lst: pre-fat.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 fat/' > $@
und-fat.lst: pre-fat.o
echo 'fat' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
fat_mod-fs_fat.o: fs/fat.c
$(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) $(fat_mod_CFLAGS) -c -o $@ $<
fat_mod-fs_fat.d: fs/fat.c
set -e; $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) $(fat_mod_CFLAGS) -M $< | sed 's,fat\.o[ :]*,fat_mod-fs_fat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include fat_mod-fs_fat.d
fat_mod_CFLAGS = $(COMMON_CFLAGS)
# For ext2.mod.
ext2_mod_SOURCES = fs/ext2.c
CLEANFILES += ext2.mod mod-ext2.o mod-ext2.c pre-ext2.o ext2_mod-fs_ext2.o def-ext2.lst und-ext2.lst
MOSTLYCLEANFILES += ext2_mod-fs_ext2.d
DEFSYMFILES += def-ext2.lst
UNDSYMFILES += und-ext2.lst
ext2.mod: pre-ext2.o mod-ext2.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-ext2.o: ext2_mod-fs_ext2.o
-rm -f $@
$(LD) -r -o $@ $^
mod-ext2.o: mod-ext2.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(ext2_mod_CFLAGS) -c -o $@ $<
mod-ext2.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'ext2' $< > $@ || (rm -f $@; exit 1)
def-ext2.lst: pre-ext2.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ext2/' > $@
und-ext2.lst: pre-ext2.o
echo 'ext2' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
ext2_mod-fs_ext2.o: fs/ext2.c
$(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) $(ext2_mod_CFLAGS) -c -o $@ $<
ext2_mod-fs_ext2.d: fs/ext2.c
set -e; $(CC) -Ifs -I$(srcdir)/fs $(CPPFLAGS) $(CFLAGS) $(ext2_mod_CFLAGS) -M $< | sed 's,ext2\.o[ :]*,ext2_mod-fs_ext2.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include ext2_mod-fs_ext2.d
ext2_mod_CFLAGS = $(COMMON_CFLAGS)
# For _linux.mod.
_linux_mod_SOURCES = loader/i386/pc/linux.c
CLEANFILES += _linux.mod mod-_linux.o mod-_linux.c pre-_linux.o _linux_mod-loader_i386_pc_linux.o def-_linux.lst und-_linux.lst
MOSTLYCLEANFILES += _linux_mod-loader_i386_pc_linux.d
DEFSYMFILES += def-_linux.lst
UNDSYMFILES += und-_linux.lst
_linux.mod: pre-_linux.o mod-_linux.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-_linux.o: _linux_mod-loader_i386_pc_linux.o
-rm -f $@
$(LD) -r -o $@ $^
mod-_linux.o: mod-_linux.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(_linux_mod_CFLAGS) -c -o $@ $<
mod-_linux.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh '_linux' $< > $@ || (rm -f $@; exit 1)
def-_linux.lst: pre-_linux.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _linux/' > $@
und-_linux.lst: pre-_linux.o
echo '_linux' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
_linux_mod-loader_i386_pc_linux.o: loader/i386/pc/linux.c
$(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_linux_mod_CFLAGS) -c -o $@ $<
_linux_mod-loader_i386_pc_linux.d: loader/i386/pc/linux.c
set -e; $(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_linux_mod_CFLAGS) -M $< | sed 's,linux\.o[ :]*,_linux_mod-loader_i386_pc_linux.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include _linux_mod-loader_i386_pc_linux.d
_linux_mod_CFLAGS = $(COMMON_CFLAGS)
# For normal.mod.
normal_mod_SOURCES = normal/cmdline.c normal/command.c normal/main.c \
normal/menu.c normal/arg.c normal/i386/setjmp.S
CLEANFILES += normal.mod mod-normal.o mod-normal.c pre-normal.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_arg.o normal_mod-normal_i386_setjmp.o def-normal.lst und-normal.lst
MOSTLYCLEANFILES += normal_mod-normal_cmdline.d normal_mod-normal_command.d normal_mod-normal_main.d normal_mod-normal_menu.d normal_mod-normal_arg.d normal_mod-normal_i386_setjmp.d
DEFSYMFILES += def-normal.lst
UNDSYMFILES += und-normal.lst
normal.mod: pre-normal.o mod-normal.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-normal.o: normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_arg.o normal_mod-normal_i386_setjmp.o
-rm -f $@
$(LD) -r -o $@ $^
mod-normal.o: mod-normal.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
mod-normal.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'normal' $< > $@ || (rm -f $@; exit 1)
def-normal.lst: pre-normal.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 normal/' > $@
und-normal.lst: pre-normal.o
echo 'normal' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
normal_mod-normal_cmdline.o: normal/cmdline.c
$(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
normal_mod-normal_cmdline.d: normal/cmdline.c
set -e; $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -M $< | sed 's,cmdline\.o[ :]*,normal_mod-normal_cmdline.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_cmdline.d
normal_mod-normal_command.o: normal/command.c
$(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
normal_mod-normal_command.d: normal/command.c
set -e; $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -M $< | sed 's,command\.o[ :]*,normal_mod-normal_command.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_command.d
normal_mod-normal_main.o: normal/main.c
$(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
normal_mod-normal_main.d: normal/main.c
set -e; $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -M $< | sed 's,main\.o[ :]*,normal_mod-normal_main.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_main.d
normal_mod-normal_menu.o: normal/menu.c
$(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
normal_mod-normal_menu.d: normal/menu.c
set -e; $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -M $< | sed 's,menu\.o[ :]*,normal_mod-normal_menu.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_menu.d
normal_mod-normal_arg.o: normal/arg.c
$(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -c -o $@ $<
normal_mod-normal_arg.d: normal/arg.c
set -e; $(CC) -Inormal -I$(srcdir)/normal $(CPPFLAGS) $(CFLAGS) $(normal_mod_CFLAGS) -M $< | sed 's,arg\.o[ :]*,normal_mod-normal_arg.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_arg.d
normal_mod-normal_i386_setjmp.o: normal/i386/setjmp.S
$(CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(CPPFLAGS) $(ASFLAGS) $(normal_mod_ASFLAGS) -c -o $@ $<
normal_mod-normal_i386_setjmp.d: normal/i386/setjmp.S
set -e; $(CC) -Inormal/i386 -I$(srcdir)/normal/i386 $(CPPFLAGS) $(ASFLAGS) $(normal_mod_ASFLAGS) -M $< | sed 's,setjmp\.o[ :]*,normal_mod-normal_i386_setjmp.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include normal_mod-normal_i386_setjmp.d
normal_mod_CFLAGS = $(COMMON_CFLAGS)
normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
# For hello.mod.
hello_mod_SOURCES = hello/hello.c
CLEANFILES += hello.mod mod-hello.o mod-hello.c pre-hello.o hello_mod-hello_hello.o def-hello.lst und-hello.lst
MOSTLYCLEANFILES += hello_mod-hello_hello.d
DEFSYMFILES += def-hello.lst
UNDSYMFILES += und-hello.lst
hello.mod: pre-hello.o mod-hello.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-hello.o: hello_mod-hello_hello.o
-rm -f $@
$(LD) -r -o $@ $^
mod-hello.o: mod-hello.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $<
mod-hello.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exit 1)
def-hello.lst: pre-hello.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hello/' > $@
und-hello.lst: pre-hello.o
echo 'hello' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
hello_mod-hello_hello.o: hello/hello.c
$(CC) -Ihello -I$(srcdir)/hello $(CPPFLAGS) $(CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $<
hello_mod-hello_hello.d: hello/hello.c
set -e; $(CC) -Ihello -I$(srcdir)/hello $(CPPFLAGS) $(CFLAGS) $(hello_mod_CFLAGS) -M $< | sed 's,hello\.o[ :]*,hello_mod-hello_hello.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include hello_mod-hello_hello.d
hello_mod_CFLAGS = $(COMMON_CFLAGS)
# For boot.mod.
boot_mod_SOURCES = commands/boot.c
CLEANFILES += boot.mod mod-boot.o mod-boot.c pre-boot.o boot_mod-commands_boot.o def-boot.lst und-boot.lst
MOSTLYCLEANFILES += boot_mod-commands_boot.d
DEFSYMFILES += def-boot.lst
UNDSYMFILES += und-boot.lst
boot.mod: pre-boot.o mod-boot.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-boot.o: boot_mod-commands_boot.o
-rm -f $@
$(LD) -r -o $@ $^
mod-boot.o: mod-boot.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(boot_mod_CFLAGS) -c -o $@ $<
mod-boot.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'boot' $< > $@ || (rm -f $@; exit 1)
def-boot.lst: pre-boot.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 boot/' > $@
und-boot.lst: pre-boot.o
echo 'boot' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
boot_mod-commands_boot.o: commands/boot.c
$(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(boot_mod_CFLAGS) -c -o $@ $<
boot_mod-commands_boot.d: commands/boot.c
set -e; $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(boot_mod_CFLAGS) -M $< | sed 's,boot\.o[ :]*,boot_mod-commands_boot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include boot_mod-commands_boot.d
boot_mod_CFLAGS = $(COMMON_CFLAGS)
# For terminal.mod.
terminal_mod_SOURCES = commands/terminal.c
CLEANFILES += terminal.mod mod-terminal.o mod-terminal.c pre-terminal.o terminal_mod-commands_terminal.o def-terminal.lst und-terminal.lst
MOSTLYCLEANFILES += terminal_mod-commands_terminal.d
DEFSYMFILES += def-terminal.lst
UNDSYMFILES += und-terminal.lst
terminal.mod: pre-terminal.o mod-terminal.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-terminal.o: terminal_mod-commands_terminal.o
-rm -f $@
$(LD) -r -o $@ $^
mod-terminal.o: mod-terminal.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(terminal_mod_CFLAGS) -c -o $@ $<
mod-terminal.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'terminal' $< > $@ || (rm -f $@; exit 1)
def-terminal.lst: pre-terminal.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 terminal/' > $@
und-terminal.lst: pre-terminal.o
echo 'terminal' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
terminal_mod-commands_terminal.o: commands/terminal.c
$(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(terminal_mod_CFLAGS) -c -o $@ $<
terminal_mod-commands_terminal.d: commands/terminal.c
set -e; $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(terminal_mod_CFLAGS) -M $< | sed 's,terminal\.o[ :]*,terminal_mod-commands_terminal.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include terminal_mod-commands_terminal.d
terminal_mod_CFLAGS = $(COMMON_CFLAGS)
# For ls.mod.
ls_mod_SOURCES = commands/ls.c
CLEANFILES += ls.mod mod-ls.o mod-ls.c pre-ls.o ls_mod-commands_ls.o def-ls.lst und-ls.lst
MOSTLYCLEANFILES += ls_mod-commands_ls.d
DEFSYMFILES += def-ls.lst
UNDSYMFILES += und-ls.lst
ls.mod: pre-ls.o mod-ls.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-ls.o: ls_mod-commands_ls.o
-rm -f $@
$(LD) -r -o $@ $^
mod-ls.o: mod-ls.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(ls_mod_CFLAGS) -c -o $@ $<
mod-ls.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'ls' $< > $@ || (rm -f $@; exit 1)
def-ls.lst: pre-ls.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 ls/' > $@
und-ls.lst: pre-ls.o
echo 'ls' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
ls_mod-commands_ls.o: commands/ls.c
$(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(ls_mod_CFLAGS) -c -o $@ $<
ls_mod-commands_ls.d: commands/ls.c
set -e; $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(ls_mod_CFLAGS) -M $< | sed 's,ls\.o[ :]*,ls_mod-commands_ls.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include ls_mod-commands_ls.d
ls_mod_CFLAGS = $(COMMON_CFLAGS)
# For cmp.mod.
cmp_mod_SOURCES = commands/cmp.c
CLEANFILES += cmp.mod mod-cmp.o mod-cmp.c pre-cmp.o cmp_mod-commands_cmp.o def-cmp.lst und-cmp.lst
MOSTLYCLEANFILES += cmp_mod-commands_cmp.d
DEFSYMFILES += def-cmp.lst
UNDSYMFILES += und-cmp.lst
cmp.mod: pre-cmp.o mod-cmp.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-cmp.o: cmp_mod-commands_cmp.o
-rm -f $@
$(LD) -r -o $@ $^
mod-cmp.o: mod-cmp.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(cmp_mod_CFLAGS) -c -o $@ $<
mod-cmp.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'cmp' $< > $@ || (rm -f $@; exit 1)
def-cmp.lst: pre-cmp.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cmp/' > $@
und-cmp.lst: pre-cmp.o
echo 'cmp' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
cmp_mod-commands_cmp.o: commands/cmp.c
$(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(cmp_mod_CFLAGS) -c -o $@ $<
cmp_mod-commands_cmp.d: commands/cmp.c
set -e; $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(cmp_mod_CFLAGS) -M $< | sed 's,cmp\.o[ :]*,cmp_mod-commands_cmp.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include cmp_mod-commands_cmp.d
cmp_mod_CFLAGS = $(COMMON_CFLAGS)
# For cat.mod.
cat_mod_SOURCES = commands/cat.c
CLEANFILES += cat.mod mod-cat.o mod-cat.c pre-cat.o cat_mod-commands_cat.o def-cat.lst und-cat.lst
MOSTLYCLEANFILES += cat_mod-commands_cat.d
DEFSYMFILES += def-cat.lst
UNDSYMFILES += und-cat.lst
cat.mod: pre-cat.o mod-cat.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-cat.o: cat_mod-commands_cat.o
-rm -f $@
$(LD) -r -o $@ $^
mod-cat.o: mod-cat.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(cat_mod_CFLAGS) -c -o $@ $<
mod-cat.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'cat' $< > $@ || (rm -f $@; exit 1)
def-cat.lst: pre-cat.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cat/' > $@
und-cat.lst: pre-cat.o
echo 'cat' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
cat_mod-commands_cat.o: commands/cat.c
$(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(cat_mod_CFLAGS) -c -o $@ $<
cat_mod-commands_cat.d: commands/cat.c
set -e; $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) $(cat_mod_CFLAGS) -M $< | sed 's,cat\.o[ :]*,cat_mod-commands_cat.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include cat_mod-commands_cat.d
cat_mod_CFLAGS = $(COMMON_CFLAGS)
# For vga.mod.
vga_mod_SOURCES = term/i386/pc/vga.c
CLEANFILES += vga.mod mod-vga.o mod-vga.c pre-vga.o vga_mod-term_i386_pc_vga.o def-vga.lst und-vga.lst
MOSTLYCLEANFILES += vga_mod-term_i386_pc_vga.d
DEFSYMFILES += def-vga.lst
UNDSYMFILES += und-vga.lst
vga.mod: pre-vga.o mod-vga.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-vga.o: vga_mod-term_i386_pc_vga.o
-rm -f $@
$(LD) -r -o $@ $^
mod-vga.o: mod-vga.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $<
mod-vga.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'vga' $< > $@ || (rm -f $@; exit 1)
def-vga.lst: pre-vga.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vga/' > $@
und-vga.lst: pre-vga.o
echo 'vga' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
vga_mod-term_i386_pc_vga.o: term/i386/pc/vga.c
$(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $<
vga_mod-term_i386_pc_vga.d: term/i386/pc/vga.c
set -e; $(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(vga_mod_CFLAGS) -M $< | sed 's,vga\.o[ :]*,vga_mod-term_i386_pc_vga.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include vga_mod-term_i386_pc_vga.d
vga_mod_CFLAGS = $(COMMON_CFLAGS)
# For font.mod.
font_mod_SOURCES = font/manager.c
CLEANFILES += font.mod mod-font.o mod-font.c pre-font.o font_mod-font_manager.o def-font.lst und-font.lst
MOSTLYCLEANFILES += font_mod-font_manager.d
DEFSYMFILES += def-font.lst
UNDSYMFILES += und-font.lst
font.mod: pre-font.o mod-font.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-font.o: font_mod-font_manager.o
-rm -f $@
$(LD) -r -o $@ $^
mod-font.o: mod-font.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(font_mod_CFLAGS) -c -o $@ $<
mod-font.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh 'font' $< > $@ || (rm -f $@; exit 1)
def-font.lst: pre-font.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 font/' > $@
und-font.lst: pre-font.o
echo 'font' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
font_mod-font_manager.o: font/manager.c
$(CC) -Ifont -I$(srcdir)/font $(CPPFLAGS) $(CFLAGS) $(font_mod_CFLAGS) -c -o $@ $<
font_mod-font_manager.d: font/manager.c
set -e; $(CC) -Ifont -I$(srcdir)/font $(CPPFLAGS) $(CFLAGS) $(font_mod_CFLAGS) -M $< | sed 's,manager\.o[ :]*,font_mod-font_manager.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include font_mod-font_manager.d
font_mod_CFLAGS = $(COMMON_CFLAGS)
# For _multiboot.mod.
_multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
CLEANFILES += _multiboot.mod mod-_multiboot.o mod-_multiboot.c pre-_multiboot.o _multiboot_mod-loader_i386_pc_multiboot.o def-_multiboot.lst und-_multiboot.lst
MOSTLYCLEANFILES += _multiboot_mod-loader_i386_pc_multiboot.d
DEFSYMFILES += def-_multiboot.lst
UNDSYMFILES += und-_multiboot.lst
_multiboot.mod: pre-_multiboot.o mod-_multiboot.o
-rm -f $@
$(LD) -r -o $@ $^
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@
pre-_multiboot.o: _multiboot_mod-loader_i386_pc_multiboot.o
-rm -f $@
$(LD) -r -o $@ $^
mod-_multiboot.o: mod-_multiboot.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
mod-_multiboot.c: moddep.lst genmodsrc.sh
sh $(srcdir)/genmodsrc.sh '_multiboot' $< > $@ || (rm -f $@; exit 1)
def-_multiboot.lst: pre-_multiboot.o
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _multiboot/' > $@
und-_multiboot.lst: pre-_multiboot.o
echo '_multiboot' > $@
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
_multiboot_mod-loader_i386_pc_multiboot.o: loader/i386/pc/multiboot.c
$(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -c -o $@ $<
_multiboot_mod-loader_i386_pc_multiboot.d: loader/i386/pc/multiboot.c
set -e; $(CC) -Iloader/i386/pc -I$(srcdir)/loader/i386/pc $(CPPFLAGS) $(CFLAGS) $(_multiboot_mod_CFLAGS) -M $< | sed 's,multiboot\.o[ :]*,_multiboot_mod-loader_i386_pc_multiboot.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@
-include _multiboot_mod-loader_i386_pc_multiboot.d
_multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
CLEANFILES += moddep.lst
pkgdata_DATA += moddep.lst
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep
cat $(DEFSYMFILES) /dev/null | ./genmoddep $(UNDSYMFILES) > $@ \
|| (rm -f $@; exit 1)