# Makefile -- libc/stdlib
# Copyright 2003 Free Software Foundation, Inc.
# Written by Stephane Carrez (stcarrez@nerim.fr)
#
# This file is part of GEL.
#
# GEL is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GEL is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GEL; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.  */
# 
SRCDIR=../../..

GEL_BASEDIR=$(SRCDIR)

include $(GEL_BASEDIR)/config/make.defs

CPPFLAGS+=-I..
PORT=random.c

# libc/string from FreeBSD 5.x (and adapted for 68HC11/68HC12)
CSRCS= abs.c atexit.c atof.c atoi.c atol.c atoll.c \
       bsearch.c calloc.c div.c exit.c _Exit.c getenv.c \
       hcreate.c heapsort.c insque.c remque.c  \
       labs.c ldiv.c llabs.c getopt.c getsubopt.c \
       putenv.c qsort.c strhash.c radixsort.c \
       rand.c reallocf.c setenv.c \
       strtol.c strtoll.c strtoq.c \
       strtoul.c strtoull.c strtouq.c tdelete.c \
       tfind.c tsearch.c twalk.c \
       imaxabs.c imaxdiv.c lldiv.c lsearch.c merge.c radixsort.c \
       strtoimax.c strtoumax.c

OBJS=$(CSRCS:.c=.o)

all::	$(OBJS) FRC
	$(AR) cr $(GEL_LIBC) $(OBJS)

$(GEL_LIBC):	$(OBJS)
	$(AR) cr $@ $(OBJS)

FRC:

