kern
annotate Makefile @ 2:86781ef20689
added hardware scrolling, memset16 and temporary keyboard input for testing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 04 Dec 2010 08:04:43 +0200 |
parents | ebe5e0e44a9d |
children | a9176938bce1 |
rev | line source |
---|---|
nuclear@0 | 1 # collect all of our C and assembly source files |
nuclear@0 | 2 csrc = $(wildcard src/*.c) $(wildcard src/klibc/*.c) |
nuclear@0 | 3 asmsrc = $(wildcard src/*.S) $(wildcard src/klibc/*.S) |
nuclear@0 | 4 |
nuclear@0 | 5 # each source file will generate one object file |
nuclear@2 | 6 obj = $(asmsrc:.S=.o) $(csrc:.c=.o) |
nuclear@0 | 7 |
nuclear@0 | 8 CC = gcc |
nuclear@0 | 9 |
nuclear@0 | 10 # -nostdinc instructs the compiler to ignore standard include directories |
nuclear@0 | 11 # -m32 instructs the compiler to produce 32bit code (in case we have a 64bit compiler) |
nuclear@0 | 12 CFLAGS = -m32 -Wall -g -nostdinc -fno-builtin -Isrc -Isrc/klibc |
nuclear@0 | 13 ASFLAGS = -m32 -g -nostdinc -fno-builtin -Isrc -Isrc/klibc |
nuclear@0 | 14 |
nuclear@0 | 15 bin = kernel.elf |
nuclear@0 | 16 |
nuclear@0 | 17 # default target: make an ELF binary by linking the object files |
nuclear@1 | 18 # we need to specify where to assume the text section (code) is going |
nuclear@1 | 19 # in memory, as well as the kernel entry point (kentry). |
nuclear@0 | 20 $(bin): $(obj) |
nuclear@1 | 21 ld -melf_i386 -o $@ -Ttext 0x200000 -e kentry $(obj) |
nuclear@0 | 22 |
nuclear@0 | 23 .PHONY: clean |
nuclear@0 | 24 clean: |
nuclear@0 | 25 rm -f $(obj) $(bin) |