diff --git a/libraries/Rakefile b/libraries/Rakefile
index f211d1f4..3169abee 100644
--- a/libraries/Rakefile
+++ b/libraries/Rakefile
@@ -6,13 +6,13 @@ libraries = %w(
memory
string
system
+ video
)
# These haven't been upgraded to work w/ Rake yet.
# execute_elf
# unicode
# ipv4
-# video
# serial
# random
# log
diff --git a/libraries/video/Rakefile b/libraries/video/Rakefile
new file mode 100644
index 00000000..bfc95de9
--- /dev/null
+++ b/libraries/video/Rakefile
@@ -0,0 +1,12 @@
+INCLUDES = %w(
+ -I../../storm/include
+ -I..
+)
+
+OBJECTS = %w(
+ video.o
+)
+
+OUTPUT = 'libvideo.a'
+
+load '../libraries.rake'
diff --git a/libraries/video/autochaos.rules b/libraries/video/autochaos.rules
deleted file mode 100644
index c3fc96a7..00000000
--- a/libraries/video/autochaos.rules
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
- makefile
- ..
-
-
-
- video.c
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/libraries/video/config.h b/libraries/video/config.h
deleted file mode 100644
index a68b9e11..00000000
--- a/libraries/video/config.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Automatically generated by autochaos 0.2.1. Not intended to be
- hand edited. */
-
-#ifndef __CONFIG_H__
-#define __CONFIG_H__
-
-#define PACKAGE_NAME "video"
-#define PACKAGE_VERSION "0.0.1"
-
-
-#endif /* !__CONFIG_H__ */
diff --git a/libraries/video/configure b/libraries/video/configure
deleted file mode 100755
index 075fc3b9..00000000
--- a/libraries/video/configure
+++ /dev/null
@@ -1,419 +0,0 @@
-#! /usr/bin/perl -w
-
-# Abstract: Script for configuring this package.
-
-# Copyright 2000 chaos development. This script is in the public domain.
-
-# Please note that this script was automatically generated by
-# autochaos 0.2.1. It should not be modified. Do the changes you
-# want in autochaos instead.
-
-use strict;
-use POSIX;
-
-my $chaos_root = "/";
-my @libraries = ();
-my @headers = ();
-my @sources = ();
-my @objects = ();
-my @deps = ();
-my $MAKEFILE;
-my $TEMPLATE;
-my $root_dir = getcwd ();
-my %options =
-(
-);
-
-my $install_prefix_flag = 0;
-
-foreach my $argument (@ARGV)
-{
- if ($install_prefix_flag eq 1)
- {
- $chaos_root = $argument;
- $install_prefix_flag = 0;
- }
- else
- {
- if ($argument eq '--install-prefix')
- {
- $install_prefix_flag = 1;
- }
- elsif ($argument =~ m/--enable-.*$/)
- {
- (my $option) = ($argument =~ m/--enable-(.*)$/);
-
- if ($options{$option})
- {
- $options{$option} = 'TRUE';
- }
- else
- {
- print "Unrecognised command line option.\n";
- exit 1;
- }
- }
- elsif ($argument =~ m/--disable-.*$/)
- {
- (my $option) = ($argument =~ m/--disable-(.*)$/);
-
- if ($options{$option})
- {
- $options{$option} = 'FALSE';
- }
- else
- {
- print "Unrecognised command line option.\n";
- exit 1;
- }
- }
- else
- {
- print "Unrecognised command line option.\n";
- exit 1;
- }
- }
-}
-
-if ($install_prefix_flag eq 1)
-{
- print "Malformed --install-prefix command option. Value missing.\n";
- exit 1;
-}
-
-print "\n Configuring library: video...\n\n";
-
-print ("Using chaos root... ($chaos_root)\n");
-
-
-my $all_arguments = "";
-foreach my $argument (@ARGV)
-{
- $all_arguments .= $argument . " ";
-}
-
-print ("Checking for autochaos... ");
-my $autochaos = `autochaos --version 2> /dev/null`;
-
-my $has_autochaos;
-unless ($autochaos)
-{
- print ("not found.\n");
- $has_autochaos = undef;
-}
-else
-{
- (my $version) = ($autochaos =~ m/ ([\d\.]+)$/);
- print ("found (version $version).\n");
- $has_autochaos = $version;
-}
-
-
-
-@headers = (
-'color.h',
-'image.h',
-'options.h',
-'return_values.h',
-'video.h',
-);
-
-@sources = (
-'video.c',
-);
-@objects = ('video.o',
-);
-@deps = ('video.dep',
-);
- print "Writing ./makefile...
-";
- open (MAKEFILE, '>' . "./makefile") or
- die ("Could not write to ./makefile: $!\n");
-
-# Write the default rules we want.
-
- print (MAKEFILE < 0)
- {
- print MAKEFILE "\n\nOBJECTS = ";
- foreach my $object (@objects)
- {
- print MAKEFILE " \\\
-$object";
- }
- print MAKEFILE "\
-";
- }
-
- if (scalar @headers > 0)
- {
- print MAKEFILE "\n\nHEADERS = ";
- foreach my $header (@headers)
- {
- print MAKEFILE " \\\
-$header";
- }
- print MAKEFILE "\
-";
- }
-
- if (scalar @sources > 0)
- {
- print MAKEFILE "\n\nSOURCES = ";
- foreach my $source (@sources)
- {
- print MAKEFILE " \\\
-$source";
- }
- print MAKEFILE "\
-";
-
- }
-
- print (MAKEFILE < \$(*F).dep
-
-%.o: %.S
- \@echo Compiling \$<...
- \@\$(CC) -o \$(@) \$(CFLAGS) \$(INCLUDES) \$(DEFS) -c \$<
- \@\$(CC) -M \$< \$(CFLAGS) \$(INCLUDES) \$(DEFS) > \$(*F).dep
-
-%.o: %.asm
- \$(NASM) -o \$(@) \$< -f elf
-
-.PHONY: splash all clean install package-source package-check package
-
-STOP
-
- {
- my $target = "library_video.a" if (scalar @objects);
-
- unless ($target)
- {
- $target = "";
- }
-
- print (MAKEFILE < 0)
- {
- print MAKEFILE " rm -f \$(OBJECTS)
-";
- }
- print (MAKEFILE < 0)
- {
- print (MAKEFILE < 0)
- {
- print (MAKEFILE < 0)
- {
- foreach my $dep (@deps)
- {
- print (MAKEFILE "-include $dep\n");
- }
- }
-
- print (MAKEFILE "\n");
-
- if (open (TEMPLATE, "." . "/makefile.template"))
- {
- while ()
- {
- my $row = $_;
-
- print (MAKEFILE $row);
- }
- }
- close (MAKEFILE);
-
-
- # Now, also write to the config.h
-
- print "Writing config.h...\
-";
- my $CONFIG;
- open (CONFIG, '>config.h');
- print (CONFIG <\n");
- }
-
- print (CONFIG "\n#endif /* !__CONFIG_H__ */\n");
-
- close (CONFIG);
diff --git a/libraries/video/makefile b/libraries/video/makefile
deleted file mode 100644
index 33ec8fdf..00000000
--- a/libraries/video/makefile
+++ /dev/null
@@ -1,119 +0,0 @@
-# This makefile was generated by autochaos 0.2.1. Please do not
-# tamper with it unless you are very certain about what you are doing.
-
-ALL_ARGUMENTS = --install-prefix /var/lib/tftpboot/chaos
-
-PREFIX = /var/lib/tftpboot/chaos
-PACKAGE = video
-
-# Compiler flags.
-
-CFLAGS = -Wall -W -Wshadow -Wpointer-arith -Waggregate-return \
--Wstrict-prototypes -Wredundant-decls -Winline -Wmissing-prototypes \
--Werror -Wcast-align -Wbad-function-cast -Wsign-compare \
--Wmissing-declarations -Wmissing-noreturn -pipe \
--Wnested-externs -O3 -fno-builtin -funsigned-char -g -m32 $(EXTRA_CFLAGS) $(DEFINES)
-
-INCLUDES = \
--I.. \
--I. -I$(PREFIX)/data/programming/c/headers
-
-ALL_OBJECTS = \
-./video.o
-
-STATIC_LIBRARY_PATH = $(PREFIX)/data/programming/libraries/static
-
-# Ideally, this would be -lwhatever, but we have not started patching
-# the GNU tools yet...
-
-LIBS =
-
-OBJECTS = \
-video.o
-
-
-HEADERS = \
-color.h \
-image.h \
-options.h \
-return_values.h \
-video.h
-
-
-SOURCES = \
-video.c
-
-HEADER_PATH = $(PREFIX)/data/programming/c/headers/$(PACKAGE)/.
-
-# TODO: Those should be overridable.
-
-CC = gcc
-NASM = nasm
-AR = ar
-RANLIB = ranlib
-GZIP = gzip -f
-
-%.o: %.c
- @echo Compiling $<...
- @$(CC) -o $(@) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
- @$(CC) -M $< $(CFLAGS) $(INCLUDES) $(DEFS) > $(*F).dep
-
-%.o: %.S
- @echo Compiling $<...
- @$(CC) -o $(@) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
- @$(CC) -M $< $(CFLAGS) $(INCLUDES) $(DEFS) > $(*F).dep
-
-%.o: %.asm
- $(NASM) -o $(@) $< -f elf
-
-.PHONY: splash all clean install package-source package-check package
-
-all: splash makefile library_video.a
-
-clean:
- rm -f library_video.a
- rm -f $(OBJECTS)
- rm -f *.dep
- -$(MAKE) clean-local
-makefile: configure
- @./configure
-
-splash:
- @echo -e "\n Compiling library: video...\n"
-
-configure: autochaos.rules
- @autochaos
-
-
-LDFLAGS = $(PREFIX)/data/programming/c/startup/startup.o \
--nostdlib -Wl,-T,$(PREFIX)/data/programming/linker/chaos.ld -lgcc -m32 $(EXTRA_LDFLAGS)
-
-library_video.a: $(OBJECTS)
- @echo "Creating library..."
- @$(AR) cru $(@) $(OBJECTS)
- @$(RANLIB) $(@)
-
-install: all
- @echo "Installing..."
- @mkdir -p $(PREFIX)/data/programming/libraries/static
- @cp library_video.a $(PREFIX)/data/programming/libraries/static
- @mkdir -p $(PREFIX)/data/programming/c/headers/$(PACKAGE)
- @for header in $(HEADERS) ; do cp -p $$header $(PREFIX)/data/programming/c/headers/$(PACKAGE) ; done
-
-package-source:
- mkdir -p /home/per/Projects/chaos-old/libraries/video/package-source/.
- -cp -f autochaos.rules changelog configure COPYING README AUTHORS TODO INSTALL /home/per/Projects/chaos-old/libraries/video/package-source/.
- -cp -f makefile.template $(EXTRA_FILES) /home/per/Projects/chaos-old/libraries/video/package-source/.
- for header in $(HEADERS) ; do cp $$header /home/per/Projects/chaos-old/libraries/video/package-source/. || exit ; done
- for source in $(SOURCES) ; do cp $$source /home/per/Projects/chaos-old/libraries/video/package-source/. || exit ; done
-package-check: package-source
- cd package-source && ./configure $(ALL_ARGUMENTS) && $(MAKE) && $(MAKE) clean
- find package-source -name makefile -exec rm {} ';'
- rm package-source/config.h
-package: package-check
- rm -rf video-0.0.1
- mv package-source video-0.0.1
- tar cvIf video-0.0.1.tar.bz2 video-0.0.1
-
--include video.dep
-