223 |
file.h fs.h kernel.h loader.h misc.h mm.h net.h rescue.h symbol.h \ |
file.h fs.h kernel.h loader.h misc.h mm.h net.h rescue.h symbol.h \ |
224 |
term.h types.h machine/biosdisk.h machine/boot.h \ |
term.h types.h machine/biosdisk.h machine/boot.h \ |
225 |
machine/console.h machine/init.h machine/memory.h \ |
machine/console.h machine/init.h machine/memory.h \ |
226 |
machine/loader.h machine/partition.h |
machine/loader.h machine/partition.h machine/vga.h |
227 |
kernel_img_CFLAGS = $(COMMON_CFLAGS) |
kernel_img_CFLAGS = $(COMMON_CFLAGS) |
228 |
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) |
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) |
229 |
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 |
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 |
394 |
|
|
395 |
|
|
396 |
# Modules. |
# Modules. |
397 |
pkgdata_MODULES = _chain.mod _linux.mod fat.mod normal.mod |
pkgdata_MODULES = _chain.mod _linux.mod fat.mod normal.mod hello.mod \ |
398 |
|
vga.mod font.mod |
399 |
|
|
400 |
# For _chain.mod. |
# For _chain.mod. |
401 |
_chain_mod_SOURCES = loader/i386/pc/chainloader.c |
_chain_mod_SOURCES = loader/i386/pc/chainloader.c |
586 |
|
|
587 |
normal_mod_CFLAGS = $(COMMON_CFLAGS) |
normal_mod_CFLAGS = $(COMMON_CFLAGS) |
588 |
normal_mod_ASFLAGS = $(COMMON_ASFLAGS) |
normal_mod_ASFLAGS = $(COMMON_ASFLAGS) |
589 |
|
|
590 |
|
# For hello.mod. |
591 |
|
hello_mod_SOURCES = hello/hello.c |
592 |
|
CLEANFILES += hello.mod mod-hello.o mod-hello.c pre-hello.o hello_mod-hello_hello.o def-hello.lst und-hello.lst |
593 |
|
MOSTLYCLEANFILES += hello_mod-hello_hello.d |
594 |
|
DEFSYMFILES += def-hello.lst |
595 |
|
UNDSYMFILES += und-hello.lst |
596 |
|
|
597 |
|
hello.mod: pre-hello.o mod-hello.o |
598 |
|
-rm -f $@ |
599 |
|
$(LD) -r -o $@ $^ |
600 |
|
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@ |
601 |
|
|
602 |
|
pre-hello.o: hello_mod-hello_hello.o |
603 |
|
-rm -f $@ |
604 |
|
$(LD) -r -o $@ $^ |
605 |
|
|
606 |
|
mod-hello.o: mod-hello.c |
607 |
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $< |
608 |
|
|
609 |
|
mod-hello.c: moddep.lst genmodsrc.sh |
610 |
|
sh $(srcdir)/genmodsrc.sh 'hello' $< > $@ || (rm -f $@; exit 1) |
611 |
|
|
612 |
|
def-hello.lst: pre-hello.o |
613 |
|
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 hello/' > $@ |
614 |
|
|
615 |
|
und-hello.lst: pre-hello.o |
616 |
|
echo 'hello' > $@ |
617 |
|
$(NM) -u -P -p $< >> $@ |
618 |
|
|
619 |
|
hello_mod-hello_hello.o: hello/hello.c |
620 |
|
$(CC) -Ihello -I$(srcdir)/hello $(CPPFLAGS) $(CFLAGS) $(hello_mod_CFLAGS) -c -o $@ $< |
621 |
|
|
622 |
|
hello_mod-hello_hello.d: hello/hello.c |
623 |
|
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 $@ |
624 |
|
|
625 |
|
-include hello_mod-hello_hello.d |
626 |
|
|
627 |
|
hello_mod_CFLAGS = $(COMMON_CFLAGS) |
628 |
|
|
629 |
|
# For vga.mod. |
630 |
|
vga_mod_SOURCES = term/i386/pc/vga.c |
631 |
|
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 |
632 |
|
MOSTLYCLEANFILES += vga_mod-term_i386_pc_vga.d |
633 |
|
DEFSYMFILES += def-vga.lst |
634 |
|
UNDSYMFILES += und-vga.lst |
635 |
|
|
636 |
|
vga.mod: pre-vga.o mod-vga.o |
637 |
|
-rm -f $@ |
638 |
|
$(LD) -r -o $@ $^ |
639 |
|
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@ |
640 |
|
|
641 |
|
pre-vga.o: vga_mod-term_i386_pc_vga.o |
642 |
|
-rm -f $@ |
643 |
|
$(LD) -r -o $@ $^ |
644 |
|
|
645 |
|
mod-vga.o: mod-vga.c |
646 |
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $< |
647 |
|
|
648 |
|
mod-vga.c: moddep.lst genmodsrc.sh |
649 |
|
sh $(srcdir)/genmodsrc.sh 'vga' $< > $@ || (rm -f $@; exit 1) |
650 |
|
|
651 |
|
def-vga.lst: pre-vga.o |
652 |
|
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 vga/' > $@ |
653 |
|
|
654 |
|
und-vga.lst: pre-vga.o |
655 |
|
echo 'vga' > $@ |
656 |
|
$(NM) -u -P -p $< >> $@ |
657 |
|
|
658 |
|
vga_mod-term_i386_pc_vga.o: term/i386/pc/vga.c |
659 |
|
$(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(vga_mod_CFLAGS) -c -o $@ $< |
660 |
|
|
661 |
|
vga_mod-term_i386_pc_vga.d: term/i386/pc/vga.c |
662 |
|
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 $@ |
663 |
|
|
664 |
|
-include vga_mod-term_i386_pc_vga.d |
665 |
|
|
666 |
|
vga_mod_CFLAGS = $(COMMON_CFLAGS) |
667 |
|
|
668 |
|
# For font.mod. |
669 |
|
font_mod_SOURCES = font/manager.c |
670 |
|
CLEANFILES += font.mod mod-font.o mod-font.c pre-font.o font_mod-font_manager.o def-font.lst und-font.lst |
671 |
|
MOSTLYCLEANFILES += font_mod-font_manager.d |
672 |
|
DEFSYMFILES += def-font.lst |
673 |
|
UNDSYMFILES += und-font.lst |
674 |
|
|
675 |
|
font.mod: pre-font.o mod-font.o |
676 |
|
-rm -f $@ |
677 |
|
$(LD) -r -o $@ $^ |
678 |
|
$(STRIP) --strip-unneeded -K pupa_mod_init -K pupa_mod_fini -R .note -R .comment $@ |
679 |
|
|
680 |
|
pre-font.o: font_mod-font_manager.o |
681 |
|
-rm -f $@ |
682 |
|
$(LD) -r -o $@ $^ |
683 |
|
|
684 |
|
mod-font.o: mod-font.c |
685 |
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(font_mod_CFLAGS) -c -o $@ $< |
686 |
|
|
687 |
|
mod-font.c: moddep.lst genmodsrc.sh |
688 |
|
sh $(srcdir)/genmodsrc.sh 'font' $< > $@ || (rm -f $@; exit 1) |
689 |
|
|
690 |
|
def-font.lst: pre-font.o |
691 |
|
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 font/' > $@ |
692 |
|
|
693 |
|
und-font.lst: pre-font.o |
694 |
|
echo 'font' > $@ |
695 |
|
$(NM) -u -P -p $< >> $@ |
696 |
|
|
697 |
|
font_mod-font_manager.o: font/manager.c |
698 |
|
$(CC) -Ifont -I$(srcdir)/font $(CPPFLAGS) $(CFLAGS) $(font_mod_CFLAGS) -c -o $@ $< |
699 |
|
|
700 |
|
font_mod-font_manager.d: font/manager.c |
701 |
|
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 $@ |
702 |
|
|
703 |
|
-include font_mod-font_manager.d |
704 |
|
|
705 |
|
font_mod_CFLAGS = $(COMMON_CFLAGS) |
706 |
CLEANFILES += moddep.lst |
CLEANFILES += moddep.lst |
707 |
pkgdata_DATA += moddep.lst |
pkgdata_DATA += moddep.lst |
708 |
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep |
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep |