Changeset 568


Ignore:
Timestamp:
Mar 9, 2006, 1:47:37 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Added glue code to compile libcaca without a libc and build applications as multiboot kernels.
Location:
libcaca/trunk
Files:
8 added
16 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/Makefile.am

    r543 r568  
    11# $Id$
    22
    3 SUBDIRS = cucul caca src test doc
     3SUBDIRS = kernel cucul caca src test doc
    44DIST_SUBDIRS = $(SUBDIRS) autotools debian msvc
    55
    6 EXTRA_DIST = NOTES COPYING.LGPL bootstrap build-dos build-win32 caca-config.in libcaca.spec
     6EXTRA_DIST = NOTES COPYING.GPL COPYING.LGPL bootstrap build-dos build-kernel build-win32 caca-config.in libcaca.spec
    77AUTOMAKE_OPTIONS = dist-bzip2
    88
  • libcaca/trunk/caca/time.c

    r536 r568  
    2020#include "config.h"
    2121
    22 #include <stdlib.h>
    23 #if defined(HAVE_SYS_TIME_H)
    24 #   include <sys/time.h>
    25 #endif
    26 #include <time.h>
    27 
    28 #if defined(USE_WIN32)
    29 #   include <windows.h>
    30 #endif
    31 
    32 #if defined(HAVE_UNISTD_H)
    33 #   include <unistd.h>
     22#if !defined(__KERNEL__)
     23#   include <stdlib.h>
     24#   if defined(HAVE_SYS_TIME_H)
     25#       include <sys/time.h>
     26#   endif
     27#   include <time.h>
     28#   if defined(USE_WIN32)
     29#       include <windows.h>
     30#   endif
     31#   if defined(HAVE_UNISTD_H)
     32#       include <unistd.h>
     33#   endif
    3434#endif
    3535
     
    4444        Sleep(usec / 1000);
    4545#else
    46         SLEEP
     46        /* SLEEP */
    4747#endif
    4848}
  • libcaca/trunk/configure.ac

    r554 r568  
    1212AM_PROG_CC_C_O
    1313AC_PROG_CPP
     14AM_PROG_AS
    1415
    1516AC_LIBTOOL_WIN32_DLL
     
    3940AC_ARG_ENABLE(network,
    4041  [  --enable-network        Network support (autodetected)])
     42AC_ARG_ENABLE(vga,
     43  [  --enable-vga            VGA support (default disabled)])
    4144
    4245dnl example programs features
     
    4851  [  --enable-doc            build documentation (needs doxygen and LaTeX)])
    4952
    50 AC_CHECK_HEADERS(signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h)
     53AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h)
    5154AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp)
    5255AC_CHECK_FUNCS(usleep gettimeofday)
     
    169172fi
    170173
     174if test "${enable_vga}" = "yes"; then
     175  ac_cv_my_have_vga="yes"
     176  CPPFLAGS="${CPPFLAGS} -I. -D__KERNEL__ -nostdinc -include kernel/kernel.h"
     177  CFLAGS="${CFLAGS} -fno-builtin -O2 -Wall"
     178  CCASFLAGS="${CCASFLAGS} -I."
     179  LDFLAGS="${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"
     180  AC_DEFINE(USE_VGA, 1, Define to activate the VGA backend driver)
     181  CACA_DRIVERS="${CACA_DRIVERS} vga"
     182fi
     183
    171184AC_MSG_CHECKING(valid output drivers)
    172185if test -z "${CACA_DRIVERS}"; then
     
    245258AC_CONFIG_FILES([
    246259  Makefile
     260  kernel/Makefile
    247261  cucul/Makefile
    248262  caca/Makefile
  • libcaca/trunk/cucul/bitmap.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #if defined(HAVE_ENDIAN_H)
    23 #   include <endian.h>
     22#if !defined(__KERNEL__)
     23#   if defined(HAVE_ENDIAN_H)
     24#       include <endian.h>
     25#   endif
     26#   include <stdio.h>
     27#   include <stdlib.h>
     28#   include <limits.h>
     29#   include <string.h>
    2430#endif
    25 
    26 #include <stdio.h>
    27 #include <stdlib.h>
    28 #include <limits.h>
    29 #include <string.h>
    3031
    3132#include "cucul.h"
  • libcaca/trunk/cucul/box.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #include <stdlib.h>
     22#if !defined(__KERNEL__)
     23#   include <stdlib.h>
     24#endif
    2325
    2426#include "cucul.h"
  • libcaca/trunk/cucul/char.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #include <stdio.h> /* BUFSIZ */
    23 #include <string.h>
    24 #include <stdlib.h>
    25 #if defined(HAVE_UNISTD_H)
    26 #   include <unistd.h>
    27 #endif
    28 #include <stdarg.h>
    29 
    30 #if defined(HAVE_SIGNAL_H)
    31 #   include <signal.h>
    32 #endif
    33 #if defined(HAVE_SYS_IOCTL_H)
    34 #   include <sys/ioctl.h>
     22#if !defined(__KERNEL__)
     23#   include <stdio.h> /* BUFSIZ */
     24#   include <string.h>
     25#   include <stdlib.h>
     26#   include <stdarg.h>
     27#   if defined(HAVE_UNISTD_H)
     28#       include <unistd.h>
     29#   endif
     30#   if defined(HAVE_SIGNAL_H)
     31#       include <signal.h>
     32#   endif
     33#   if defined(HAVE_SYS_IOCTL_H)
     34#       include <sys/ioctl.h>
     35#   endif
    3536#endif
    3637
  • libcaca/trunk/cucul/conic.c

    r540 r568  
    2121#include "config.h"
    2222
    23 #include <stdlib.h>
     23#if !defined(__KERNEL__)
     24#   include <stdlib.h>
     25#endif
    2426
    2527#include "cucul.h"
  • libcaca/trunk/cucul/cucul.c

    r560 r568  
    2121#include "config.h"
    2222
    23 #include <stdlib.h>
    24 #include <string.h>
     23#if !defined(__KERNEL__)
     24#   include <stdlib.h>
     25#   include <string.h>
     26#endif
    2527
    2628#include "cucul.h"
  • libcaca/trunk/cucul/cucul_internals.h

    r560 r568  
    2121#define __CUCUL_INTERNALS_H__
    2222
    23 #if defined(HAVE_INTTYPES_H) || defined(_DOXYGEN_SKIP_ME)
     23#if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
    2424#   include <inttypes.h>
    25 #elif !defined(CUSTOM_INTTYPES)
     25#elif !defined(CUSTOM_INTTYPES) && !defined(_DOXYGEN_SKIP_ME)
    2626#   define CUSTOM_INTTYPES
    2727typedef unsigned char uint8_t;
    28 typedef unsigned char uint16_t;
     28typedef unsigned short uint16_t;
    2929typedef unsigned int uint32_t;
    3030#endif
  • libcaca/trunk/cucul/export.c

    r560 r568  
    2222#include "config.h"
    2323
    24 #include <stdlib.h>
    25 #include <stdio.h>
    26 #include <string.h>
     24#if !defined(__KERNEL__)
     25#   include <stdlib.h>
     26#   include <stdio.h>
     27#   include <string.h>
     28#endif
    2729
    2830#include "cucul.h"
  • libcaca/trunk/cucul/line.c

    r540 r568  
    2121#include "config.h"
    2222
    23 #include <stdlib.h>
     23#if !defined(__KERNEL__)
     24#   include <stdlib.h>
     25#endif
    2426
    2527#include "cucul.h"
  • libcaca/trunk/cucul/math.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #include <stdlib.h>
     22#if !defined(__KERNEL__)
     23#   include <stdlib.h>
     24#endif
    2325
    2426#include "cucul.h"
  • libcaca/trunk/cucul/sprite.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #include <stdio.h>
    23 #include <stdlib.h>
    24 #include <string.h>
     22#if !defined(__KERNEL__)
     23#   include <stdio.h>
     24#   include <stdlib.h>
     25#   include <string.h>
     26#endif
    2527
    2628#include "cucul.h"
  • libcaca/trunk/cucul/triangle.c

    r540 r568  
    2020#include "config.h"
    2121
    22 #include <stdlib.h>
     22#if !defined(__KERNEL__)
     23#   include <stdlib.h>
     24#endif
    2325
    2426#include "cucul.h"
  • libcaca/trunk/src

    • Property svn:ignore
      •  

        old new  
        33.libs
        44.deps
        5 caca-spritedit
        6 caca-spritedit.exe
        75cacaview
        8 cacaview.exe
        96cacaball
        10 cacaball.exe
        117cacafire
        12 cacafire.exe
        138cacamoir
        14 cacamoir.exe
        159cacaplas
        16 cacaplas.exe
         10*.exe
  • libcaca/trunk/src/aafire.c

    r527 r568  
    2525#ifdef LIBCACA
    2626#include "config.h"
    27 #include <stdio.h>
    28 #include <stdlib.h>
    29 #include <string.h>
     27#if !defined(__KERNEL__)
     28#   include <stdio.h>
     29#   include <stdlib.h>
     30#   include <string.h>
     31#endif
    3032#include "caca.h"
    3133#else
Note: See TracChangeset for help on using the changeset viewer.