Changeset 4317


Ignore:
Timestamp:
Feb 7, 2010, 1:22:31 AM (7 years ago)
Author:
sam
Message:

Move some configuration stuff from build-kernel into configure.ac.

Location:
libcaca/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/build-kernel

    r4219 r4317  
    77set -e
    88
    9 CFLAGS="-fno-builtin -O0 -I. -I.. -I../caca/ -Wall -D__KERNEL__ -fno-stack-protector -m32"
    10 LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"
     9MYCFLAGS="-fno-builtin -O0 -I. -I.. -I../caca/ -Wall -D__KERNEL__ -fno-stack-protector -m32"
    1110
    12 ./configure --disable-slang --disable-ncurses --disable-win32 \
    13             --disable-conio --disable-x11 --disable-gl --disable-network \
    14             --enable-vga --disable-imlib2 --disable-doc \
    15             --host i386
     11./configure --enable-kernel --disable-doc --host i386
    1612
    1713# Compile cacademo, leave it as an object
    1814cd caca && make && cd ..
    1915cd examples && make dithering.o && cd ..
    20 
    2116
    2217cd kernel
     
    2520nasm -f bin -o bootsect.bin boot/bootsect.asm
    2621# Interruption handlers
    27 nasm -f elf -o int.o boot/int.asm 
     22nasm -f elf -o int.o boot/int.asm
    2823
    2924##### Boot (x86)
    3025# Stage2, loads GDT, PIC, IDT, interrupts, then calls kmain()
    31 gcc $CFLAGS boot/stage2.c -c
     26gcc $MYCFLAGS boot/stage2.c -c
    3227# GDT installation, called by stage2
    33 gcc $CFLAGS boot/gdt.c -c
     28gcc $MYCFLAGS boot/gdt.c -c
    3429# PIC installation, called by stage2
    35 gcc $CFLAGS boot/pic.c -c
     30gcc $MYCFLAGS boot/pic.c -c
    3631# IDT installation, called by stage2
    37 gcc $CFLAGS boot/idt.c -c
     32gcc $MYCFLAGS boot/idt.c -c
    3833# Interruptions installation, called by stage2
    39 gcc $CFLAGS boot/interruptions.c -c
     34gcc $MYCFLAGS boot/interruptions.c -c
    4035
    41 ##### Drivers 
     36##### Drivers
    4237# Floppy driver
    43 gcc $CFLAGS drivers/floppy.c -c
     38gcc $MYCFLAGS drivers/floppy.c -c
    4439# Processor driver
    45 gcc $CFLAGS drivers/processor.c -c
     40gcc $MYCFLAGS drivers/processor.c -c
    4641# Keyboard handler
    47 gcc $CFLAGS drivers/keyboard.c -c
     42gcc $MYCFLAGS drivers/keyboard.c -c
    4843# Memory driver
    49 gcc $CFLAGS drivers/memory.c -c
     44gcc $MYCFLAGS drivers/memory.c -c
    5045# Programmable Interval Timer driver
    51 gcc $CFLAGS drivers/timer.c -c
     46gcc $MYCFLAGS drivers/timer.c -c
    5247
    5348# Minimalistic libc
    54 gcc $CFLAGS klibc.c -c
     49gcc $MYCFLAGS klibc.c -c
    5550
    5651# Kernel by itself, contains cmain() which calls main()
    57 gcc $CFLAGS kernel.c -c
     52gcc $MYCFLAGS kernel.c -c
    5853
    5954# Link everything but bootsector, kernel.o MUST be at the very end
    60 ld --oformat binary -Ttext 1000 stage2.o gdt.o pic.o int.o idt.o interruptions.o keyboard.o memory.o timer.o floppy.o processor.o klibc.o kernel.o ../caca/.libs/libcaca.a -Map kernel.map    -o kern.bin 
    61    
     55ld --oformat binary -Ttext 1000 stage2.o gdt.o pic.o int.o idt.o interruptions.o keyboard.o memory.o timer.o floppy.o processor.o klibc.o kernel.o ../caca/.libs/libcaca.a -Map kernel.map    -o kern.bin
     56
    6257ls -ail kern.bin
    6358cd ..
  • libcaca/trunk/build-win32

    r4148 r4317  
    2121cd "${BUILDDIR}"
    2222# Build for win32
    23 "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc "$@"
     23"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
    2424make pkglibdir=/lib pkgdatadir=/data bindir=/bin
    2525# Install into our private directory
  • libcaca/trunk/configure.ac

    r4296 r4317  
    5555AC_MSG_RESULT($LT_SUFFIX)
    5656AC_SUBST(LT_SUFFIX)
     57
     58dnl global configuration features
     59AC_ARG_ENABLE(kernel,
     60  [  --enable-kernel         kernel mode (default no)])
    5761
    5862dnl output driver features
     
    7276  [  --enable-cocoa          Cocoa support (autodetected)])
    7377AC_ARG_ENABLE(network,
    74   [  --enable-network        Network support (autodetected)])
     78  [  --enable-network        network support (autodetected)])
    7579AC_ARG_ENABLE(vga,
    76   [  --enable-vga            VGA support (default disabled)])
     80  [  --enable-vga            VGA support for kernel mode (autodetected)])
    7781
    7882dnl language bindings
     
    103107AC_ARG_ENABLE(zzuf,
    104108  [  --enable-zzuf           use zzuf for fuzzing tests (autodetected)])
     109
     110ac_cv_my_have_kernel="no"
     111if test "${enable_kernel}" = "yes"; then
     112  ac_cv_my_have_kernel="yes"
     113  CPPFLAGS="${CPPFLAGS} -I. -D__KERNEL__ -nostdinc -include kernel/klibc.h -fno-stack-protector"
     114  CCASFLAGS="${CCASFLAGS} -I. -fno-stack-protector"
     115  CFLAGS="${CFLAGS} -fno-builtin -O0 -I. -I.. -I../caca/ -Wall -D__KERNEL__ -fno-stack-protector -m32"
     116  LDFLAGS="${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -fno-stack-protector"
     117  AC_DEFINE(USE_KERNEL, 1, Define to 1 to activate kernel mode)
     118fi
     119AM_CONDITIONAL(USE_KERNEL, test "${ac_cv_my_have_kernel}" = "yes")
    105120
    106121AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h termios.h)
     
    309324fi
    310325
    311 if test "${enable_vga}" = "yes"; then
    312   ac_cv_my_have_vga="yes"
    313   CPPFLAGS="${CPPFLAGS} -I. -D__KERNEL__ -nostdinc -include kernel/klibc.h -fno-stack-protector"
    314   CFLAGS="${CFLAGS} -fno-builtin -O2 -Wall -fno-stack-protector"
    315   CCASFLAGS="${CCASFLAGS} -I. -fno-stack-protector"
    316   LDFLAGS="${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -fno-stack-protector"
    317   AC_DEFINE(USE_VGA, 1, Define to 1 to activate the VGA backend driver)
    318   CACA_DRIVERS="${CACA_DRIVERS} vga"
    319 fi
    320 AM_CONDITIONAL(USE_KERNEL, test "${ac_cv_my_have_vga}" = "yes")
     326if test "${enable_vga}" != "no"; then
     327  if test "${ac_cv_my_have_kernel}" = "yes"; then
     328    AC_DEFINE(USE_VGA, 1, Define to 1 to activate the VGA backend driver)
     329    CACA_DRIVERS="${CACA_DRIVERS} vga"
     330  elif test "${enable_vga}" = "yes"; then
     331    AC_MSG_ERROR([--enable-vga requires --enable-kernel])
     332  fi
     333fi
    321334
    322335if test "${enable_debug}" = "yes"; then
     
    359372# How to get the C99 types. See caca/caca_types.h.in for details about
    360373# the CACA_TYPES variable
    361 if test "${ac_cv_my_have_vga}" = "yes"; then
     374if test "${ac_cv_my_have_kernel}" = "yes"; then
    362375  CACA_TYPES=0
    363376else
     
    413426# Build the Java bindings?
    414427ac_cv_my_have_java="no"
    415 if test "${enable_java}" != "no"; then
     428if test "${enable_java}" != "no" -a "${ac_cv_my_have_kernel}" != "yes"; then
    416429  AC_PATH_PROG(JAVAC, javac, no)
    417430  AC_PATH_PROG(JAVAH, javah, no)
  • libcaca/trunk/kernel/klibc.h

    r4300 r4317  
    11/*
    2  *  libcaca       
    32 *  libcaca       Colour ASCII-Art library
    43 *  Copyright (c) 2006 Sam Hocevar <sam@hocevar.net>
     
    2019 */
    2120
     21#if !defined HAVE_KLIBC_H
     22#define HAVE_KLIBC_H
    2223
    2324/* Various typedefs -- some are x86-specific */
     
    147148
    148149void print(char *str);
     150
     151#endif /* HAVE_KLIBC_H */
     152
Note: See TracChangeset for help on using the changeset viewer.