# Makefile for Amiga Linux lib 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.


KERNELHDRS = ../include
INCFLAGS   = -nostdinc -I$(KERNELHDRS)
CC	   = gcc -DKERNEL -b linux
CFLAGS	   =-Wall -Wstrict-prototypes $(INCFLAGS) -O2 -mc68020 -fomit-frame-pointer

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

OBJS  = bcopy.o memchr.o strcat.o strcspn.o strncpy.o strstr.o ctype.o \
	memcmp.o strchr.o strlen.o strpbrk.o strtok.o errno.o memcpy.o \
	strcmp.o strncat.o strrchr.o malloc.o memmove.o strcpy.o strncmp.o \
	strspn.o vsprintf.o restorer.o _exit.o open.o wait.o

lib.a: $(OBJS)
	ar ruv lib.a $(OBJS)
	ranlib lib.a

clean:
	$(RM) $(RMFLAGS) *.o *.a

dep:
	$(CPP) -M $(INCFLAGS) *.c > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
