kern

view Makefile @ 4:0489a34ab348

- reverted the trunk back to hardware scrolling - added a missing include (ctype.h in term.c) - added a comment explaining what memset16 does - beefed up the README file
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 10 Dec 2010 03:44:34 +0200
parents 86781ef20689
children 611b2d66420b
line source
1 # collect all of our C and assembly source files
2 csrc = $(wildcard src/*.c) $(wildcard src/klibc/*.c)
3 asmsrc = $(wildcard src/*.S) $(wildcard src/klibc/*.S)
5 # each source file will generate one object file
6 obj = $(asmsrc:.S=.o) $(csrc:.c=.o)
8 CC = gcc
10 # -nostdinc instructs the compiler to ignore standard include directories
11 # -m32 instructs the compiler to produce 32bit code (in case we have a 64bit compiler)
12 CFLAGS = -m32 -Wall -g -nostdinc -fno-builtin -Isrc -Isrc/klibc
13 ASFLAGS = -m32 -g -nostdinc -fno-builtin -Isrc -Isrc/klibc
15 bin = kernel.elf
17 # default target: make an ELF binary by linking the object files
18 # we need to specify where to assume the text section (code) is going
19 # in memory, as well as the kernel entry point (kentry).
20 $(bin): $(obj)
21 ld -melf_i386 -o $@ -Ttext 0x100000 -e kentry $(obj)
23 .PHONY: clean
24 clean:
25 rm -f $(obj) $(bin)