# Makefile for Amiga Linux kernel source directory 
#
# Copyright 1993 by Hamish Macdonald
#
# This file is subject to the terms and conditions of the GNU General Public 
# License.  See the file "README.legal" in the main directory of this archive
# for more details.
 
LD=/gcc/compilers/linux/2.2.2/ld
CFLAGS=-Wall -DKERNEL -b linux -nostdinc -I/dev/linux/include -O6 -fomit-frame-pointer -mc68020

LDFLAGS=

.c.o:
	$(CC) $(CFLAGS) -c -o $*.o $<
.s.o:
	$(CC) $(CFLAGS) -c -o $*.o $<

SUBDIRS 	= chr_drv blk_drv # math

OBJS	= sched.o printk.o traps.o vsprintf.o sys.o panic.o signal.o fork.o \
	  itimer.o math.o bcopy.o exit.o sys_call.o ints.o

all: kernel.o kernelsubdirs

kernel.o: $(OBJS)
	$(LD) -r -o kernel.o $(OBJS)

kernelsubdirs:
	cd /dev/linux/kernel/chr_drv && $(MAKE)
	cd /dev/linux/kernel/blk_drv && $(MAKE)

clean:
	rm -f *.o
	for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
