[Prev][Next][Index][Thread]

Re: Compiling OS KIt Kernles



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


Follow-Ups: References: