File: build-kernel

package info (click to toggle)
libcaca 0.99.beta14-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,720 kB
  • ctags: 2,334
  • sloc: ansic: 18,652; cs: 1,171; objc: 835; cpp: 741; makefile: 446; sh: 289; python: 215; ruby: 190; asm: 93
file content (38 lines) | stat: -rwxr-xr-x 1,080 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh

##  Kernel-mode libcaca compilation script -- Sam Hocevar <sam@zoy.org>
##  $Id$

set -x
set -e

CFLAGS="-fno-builtin -O2 -I. -I.. -I../cucul/ -Wall"
CPPFLAGS="-D__KERNEL__ -nostdinc -include kernel/kernel.h"
LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"

./configure --disable-slang --disable-ncurses --disable-win32 \
            --disable-conio --disable-x11 --disable-gl --disable-network \
            --enable-vga --disable-imlib2 --disable-doc \
            --host i386

# We need this.
make clean

cd cucul && make && cd ..
cd caca && make && cd ..

cd src && make cacademo.o && cd ..

cd kernel &&
    gcc $CFLAGS -c multiboot.S -o multiboot.o &&
    gcc $CFLAGS $CPPFLAGS -c kernel.c -o kernel.o &&
cd ..

gcc $LDFLAGS -o src/cacademo kernel/multiboot.o kernel/kernel.o src/cacademo.o caca/.libs/libcaca.a cucul/.libs/libcucul.a

objcopy -O binary src/cacademo cacademo.boot

# For further development: create floppy images using the kernel
gcc -traditional -c -o bootsect.o kernel/bootsect.S
ld -Ttext 0x0 -s --oformat binary bootsect.o -o cacademo.img