3 target_machine=yeeloong
4 COMMON_CFLAGS += -march=mips3
5 COMMON_ASFLAGS += -march=mips3
7 kernel_img_HEADERS += bitmap.h video.h gfxterm.h font.h bitmap_scale.h bufio.h
9 include $(srcdir)/conf/mips.mk
11 pkglib_IMAGES = kernel.img
12 kernel_img_SOURCES = kern/$(target_cpu)/startup.S \
13 kern/main.c kern/device.c kern/$(target_cpu)/init.c \
14 kern/$(target_cpu)/$(target_machine)/init.c \
15 kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
16 kern/misc.c kern/mm.c kern/term.c \
17 kern/rescue_parser.c kern/rescue_reader.c \
18 kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
19 kern/parser.c kern/partition.c kern/env.c kern/$(target_cpu)/dl.c \
20 kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c kern/time.c \
21 kern/$(target_cpu)/cache.S \
24 font/font_cmd.c font/font.c io/bufio.c \
25 video/video.c video/fb/video_fb.c video/fb/fbblit.c \
26 video/fb/fbfill.c video/fb/fbutil.c video/bitmap.c \
27 video/bitmap_scale.c video/sm712.c bus/pci.c bus/bonito.c \
28 term/gfxterm.c commands/extcmd.c lib/arg.c \
30 kernel_img_CFLAGS = $(COMMON_CFLAGS) -DUSE_ASCII_FAILBACK
31 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
32 kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \
33 -Wl,-N,-S,-Ttext,$(LINK_BASE),-Bstatic
34 kernel_img_FORMAT = binary
37 pkglib_MODULES += ata.mod
38 ata_mod_SOURCES = disk/ata.c
39 ata_mod_CFLAGS = $(COMMON_CFLAGS)
40 ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
43 pkglib_MODULES += lspci.mod
44 lspci_mod_SOURCES = commands/lspci.c
45 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
46 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
49 pkglib_MODULES += ata_pthru.mod
50 ata_pthru_mod_SOURCES = disk/ata_pthru.c
51 ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
52 ata_pthru_mod_LDFLAGS = $(COMMON_LDFLAGS)
55 pkglib_MODULES += mmap.mod
56 mmap_mod_SOURCES = mmap/mmap.c mmap/mips/yeeloong/uppermem.c
57 mmap_mod_CFLAGS = $(COMMON_CFLAGS)
58 mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
59 mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
62 pkglib_MODULES += datetime.mod
63 datetime_mod_SOURCES = lib/cmos_datetime.c
64 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
65 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
68 pkglib_MODULES += date.mod
69 date_mod_SOURCES = commands/date.c
70 date_mod_CFLAGS = $(COMMON_CFLAGS)
71 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
74 pkglib_MODULES += datehook.mod
75 datehook_mod_SOURCES = hook/datehook.c
76 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
77 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
79 pkglib_MODULES += linux.mod
80 linux_mod_SOURCES = loader/$(target_cpu)/linux.c
81 linux_mod_CFLAGS = $(COMMON_CFLAGS)
82 linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
83 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
85 sbin_SCRIPTS += grub-install
86 grub_install_SOURCES = util/grub-install.in