?? makefile
字號(hào):
####################### Makefile for Tinix ######################## Entry point of Tinix# It must be as same as 'KernelEntryPointPhyAddr' in load.inc!!!ENTRYPOINT = 0x30400# Offset of entry point in kernel file# It depends on ENTRYPOINTENTRYOFFSET = 0x400# Programs, flags, etc.ASM = nasmDASM = ndisasmCC = gccLD = ldASMBFLAGS = -I boot/includeASMKFLAGS = -I include -f elfCFLAGS = -I include -c -fno-builtinLDFLAGS = -s -Ttext $(ENTRYPOINT)DASMFLAGS = -u -o $(ENTRYPOINT) -e $(ENTRYOFFSET)# This ProgramTINIXBOOT = boot/boot.bin boot/loader.binTINIXKERNEL = kernel.binOBJS = kernel/kernel.o kernel/syscall.o kernel/start.o kernel/main.o\ kernel/clock.o kernel/i8259.o kernel/global.o kernel/protect.o\ kernel/proc.o kernel/keyboard.o kernel/tty.o kernel/console.o\ kernel/printf.o kernel/vsprintf.o \ lib/klib.o lib/klibc.o lib/string.o DASMOUTPUT = kernel.bin.asm# All Phony Targets.PHONY : everything final image clean realclean disasm all buildimg# Default starting positioneverything : $(TINIXBOOT) $(TINIXKERNEL)all : realclean everythingfinal : all cleanimage : final buildimgclean : rm -f $(OBJS)realclean : rm -f $(OBJS) $(TINIXBOOT) $(TINIXKERNEL)disasm : $(DASM) $(DASMFLAGS) $(TINIXKERNEL) > $(DASMOUTPUT)# Write "boot.bin" & "loader.bin" into floppy image "TINIX.IMG"# We assume that "TINIX.IMG" exists in current folderbuildimg : mount TINIX.IMG /mnt/floppy -o loop cp -f boot/loader.bin /mnt/floppy/ cp -f kernel.bin /mnt/floppy umount /mnt/floppyboot/boot.bin : boot/boot.asm boot/include/load.inc boot/include/fat12hdr.inc $(ASM) $(ASMBFLAGS) -o $@ $<boot/loader.bin : boot/loader.asm boot/include/load.inc boot/include/fat12hdr.inc boot/include/pm.inc $(ASM) $(ASMBFLAGS) -o $@ $<$(TINIXKERNEL) : $(OBJS) $(LD) $(LDFLAGS) -o $(TINIXKERNEL) $(OBJS)kernel/kernel.o : kernel/kernel.asm include/sconst.inc $(ASM) $(ASMKFLAGS) -o $@ $<kernel/syscall.o : kernel/syscall.asm include/sconst.inc $(ASM) $(ASMKFLAGS) -o $@ $<kernel/start.o: kernel/start.c include/type.h include/const.h include/protect.h include/string.h include/proc.h include/proto.h \ include/tty.h include/console.h include/global.h $(CC) $(CFLAGS) -o $@ $<kernel/main.o: kernel/main.c include/type.h include/const.h include/protect.h include/string.h include/proc.h include/proto.h \ include/tty.h include/console.h include/global.h $(CC) $(CFLAGS) -o $@ $<kernel/i8259.o: kernel/i8259.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \ include/tty.h include/console.h include/global.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/global.o: kernel/global.c include/type.h include/const.h include/protect.h include/proc.h \ include/tty.h include/console.h include/global.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/protect.o: kernel/protect.c include/type.h include/const.h include/protect.h include/proc.h include/proto.h \ include/tty.h include/console.h include/global.h $(CC) $(CFLAGS) -o $@ $<kernel/clock.o: kernel/clock.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \ include/tty.h include/console.h include/global.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/proc.o: kernel/proc.c include/type.h include/const.h include/protect.h include/string.h include/proc.h include/proto.h \ include/tty.h include/console.h include/global.h $(CC) $(CFLAGS) -o $@ $<kernel/keyboard.o: kernel/keyboard.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \ include/tty.h include/console.h include/global.h include/keyboard.h include/keymap.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/tty.o: kernel/tty.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \ include/tty.h include/console.h include/global.h include/keyboard.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/console.o: kernel/console.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \ include/tty.h include/console.h include/global.h include/keyboard.h include/proto.h $(CC) $(CFLAGS) -o $@ $<kernel/vsprintf.o: kernel/vsprintf.c include/type.h include/const.h include/string.h $(CC) $(CFLAGS) -o $@ $<kernel/printf.o: kernel/printf.c include/type.h include/const.h $(CC) $(CFLAGS) -o $@ $<#kernel/cls.o: kernel/cls.c include/type.h include/const.h include/protect.h include/string.h include/proc.h \# include/tty.h include/console.h include/global.h include/keyboard.h include/proto.h# $(CC) $(CFLAGS) -o $@ $<lib/klibc.o: lib/klib.c include/type.h include/const.h include/protect.h include/string.h include/proc.h include/proto.h \ include/tty.h include/console.h include/global.h $(CC) $(CFLAGS) -o $@ $<lib/klib.o : lib/klib.asm include/sconst.inc $(ASM) $(ASMKFLAGS) -o $@ $<lib/string.o : lib/string.asm $(ASM) $(ASMKFLAGS) -o $@ $<
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -