[Prev][Next][Index][Thread]
Re: Compiling OS KIt Kernles
Lo and Behold, Mike Ashley said:
One handy thing is the ability to use GNU autoconf-created files in a
nearly trivial fashion with the oskit. If you use the 'configure'
script to generate the Makefile, then simply set the value of AR and
CC in your environment, then run 'configure' with the right prefix,
build, host, and target values. If you wanted to compile a program
called "program", located in "/path/to/program", and you'd installed
the oskit (gmake install) in /z/danderse/inst, then you'd use this
setup:
AR=i486-linux-ar RANLIB=i486-linux-ranlib \
CC='i486-linux-gcc -nostdinc -idirafter /z/danderse/inst/include -idirafter /z/d
anderse/inst/include/oskit/c -B/z/danderse/inst/ -L/z/danderse/inst/lib' \
/path/to/program/configure \
--prefix=/z/danderse/inst --build=i586-freebsd
(This is what I use under FreeBSD, using the linux elf tools.
Obviously, tweak things to the way you like them).
-Dave
> Levi wrote:
> > I can't grok makefiles. If someone could be so kind as to help me
> > with this, I'd really apreciate it.
>
> I wanted to avoid working in the oskit release directory, so in the
> examples directory I deleted a few .o files and executables and then
> tried 'make -n' on some judicious targets. I managed to come up with
> the following sort of simplified makefile, and the examples I've looked
> at follow this same pattern.
>
> Mike
>
> oskitlib=/usr/local/lib/oskit
> oskitinc=-nostdinc -I. -I/usr/local/include -I/usr/local/include/oskit/c
>
> CFLAGS=-DOSKIT ${oskitinc} -O2 -Wall
> LDFLAGS=-Ttext 100000 -nostdlib -L/usr/local/lib
>
> zimage: pingreply
> mklinuximage -o zimage pingreply
>
> pingreply: pingreply.o bootp.o dummy.o
> ld ${LDFLAGS} -o pingreply \
> ${oskitlib}/multiboot.o pingreply.o bootp.o dummy.o \
> -loskit_bootp -loskit_linux_dev -loskit_dev -loskit_kern \
> -loskit_c -loskit_lmm \
> ${oskitlib}/crtn.o
>
> clean:
> rm -f *.o pingreply zimage
>
--
work: danderse@cs.utah.edu me: angio@pobox.com
University of Utah http://www.angio.net/
Computer Science - Flux Research Group
References: