SHELL = /bin/sh

###
include $(BUILDHOME)/buildprefs/make.pre
###

TARGET		= $(OBJ_DIR)/libtu.a

# On ppc, libroot doesn't have re_search, for example.
# Use our package local version of regexp for now.
# FIXME: Why is this?
ifeq ($(CPU), ppc)
REGEX = regex.c
OBSTACK = obstack.c
GETLINE = getline.c
STRTOUMAX = strtoumax.c
endif

SRCS =	argmatch.c \
		chown.c \
		closeout.c \
		diacrit.c \
		error.c \
		full-write.c \
		$(GETLINE) \
		hard-locale.c \
		human.c \
		lchown.c \
		linebuffer.c \
		long-options.c \
		md5.c \
		memcasecmp.c \
		memcoll.c \
		mktime.c \
		$(OBSTACK) \
		quotearg.c \
		readtokens.c \
		$(REGEX) \
		safe-read.c \
		$(STRTOUMAX) \
		version-etc.c \
		xmalloc.c \
		xstrdup.c \
		xstrtod.c \
		xstrtol.c \
		xstrtoul.c \
		xstrtoumax.c

OBJS		= $(SRCS_LIST_TO_OBJS)

CFLAGS		+= -DHAVE_CONFIG_H

INCLUDES 	+= -I. -I.. -I../intl

MY_INSTALL_DIR	= $(BELIBRARIES)

$(TARGET):	$(OBJ_DIR) $(OBJS)
	$(AR) $(ARFLAGS) $@ $(OBJS)

###
include $(BUILDHOME)/buildprefs/make.post
###
