2005-04-21 16:53:53 +02:00
|
|
|
# Makefile for kernel
|
|
|
|
|
|
|
|
# Directories
|
|
|
|
u = /usr
|
|
|
|
i = $u/include
|
|
|
|
l = $u/lib
|
2005-06-24 18:24:40 +02:00
|
|
|
s = system
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
# Programs, flags, etc.
|
|
|
|
CC = exec cc
|
|
|
|
CPP = $l/cpp
|
|
|
|
LD = $(CC) -.o
|
2005-06-20 13:26:48 +02:00
|
|
|
CFLAGS = -I$i
|
2005-04-21 16:53:53 +02:00
|
|
|
LDFLAGS = -i
|
|
|
|
|
|
|
|
HEAD = mpx.o
|
|
|
|
OBJS = start.o protect.o klibc.o klib.o table.o main.o proc.o \
|
2005-06-20 13:26:48 +02:00
|
|
|
i8259.o exception.o system.o clock.o misc.o
|
2005-06-24 18:24:40 +02:00
|
|
|
SYS_OBJS = $s/proctl.o $s/copying.o $s/devio.o $s/sysctl.o $s/misc.o \
|
|
|
|
$s/sigctl.o $s/tracing.o $s/clock.o $s/irqctl.o $s/debugging.o
|
2005-06-20 13:26:48 +02:00
|
|
|
LIBS = -ltimers
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
# What to make.
|
2005-06-24 18:24:40 +02:00
|
|
|
kernel build: $(HEAD) $(OBJS) $(SYS_OBJS)
|
|
|
|
$(LD) $(CFLAGS) $(LDFLAGS) -o kernel $(HEAD) $(OBJS) $(SYS_OBJS) $(LIBS)
|
2005-05-04 11:31:54 +02:00
|
|
|
install -S 0 kernel
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-06-24 18:24:40 +02:00
|
|
|
$(SYS_OBJS):
|
2005-04-21 16:53:53 +02:00
|
|
|
cd system && $(MAKE)
|
|
|
|
|
|
|
|
all install:
|
|
|
|
cd system && $(MAKE) -$(MAKEFLAGS) $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
cd system && $(MAKE) -$(MAKEFLAGS) $@
|
|
|
|
rm -f *.o *.bak kernel
|
|
|
|
|
2005-06-24 18:24:40 +02:00
|
|
|
depend:
|
|
|
|
cd system && $(MAKE) -$(MAKEFLAGS) $@
|
|
|
|
/usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c system/*.c > .depend
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-06-24 18:24:40 +02:00
|
|
|
# Include generated dependencies.
|
|
|
|
include .depend
|
2005-04-21 16:53:53 +02:00
|
|
|
|