File: build-kernel

package info (click to toggle)
libcaca 0.99.beta11.debian-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,372 kB
  • ctags: 2,437
  • sloc: ansic: 14,847; sh: 9,203; cpp: 604; makefile: 366; asm: 28
file content (38 lines) | stat: -rwxr-xr-x 1,137 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: build-kernel 836 2006-09-18 07:30:14Z sam $

set -x
set -e

CFLAGS="-fno-builtin -O2 -I. -I.. -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 /usr/src/linux/arch/i386/boot/bootsect.S
#ld -Ttext 0x0 -s --oformat binary bootsect.o -o cacademo.img