# Generated automatically from Makefile.in by configure.
# Makefile for GNU grep
#
# makefile
#
# Copyright (C) 1994 Be Inc.  All Rights Reserved
#

SHELL		:= /bin/sh

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

INCLUDES	+= -I.
CFLAGS		+=	\
				-DGREP \
				-DSTDC_HEADERS=1 \
				-DHAVE_STRING_H=1 \
				-DHAVE_SYS_PARAM_H=1 \
     			-DHAVE_UNISTD_H=1 \
				-DHAVE_ALLOCA_H=1 \
				-DHAVE_MEMCHR=1 \
				-DHAVE_STRERROR=1 \
     			-DNBPC=4096

TARGET		= $(OBJ_DIR)/grep

APP_VERSION		= -app 2 0 0 d 0 -short 2.0 -long "2.0 "`echo -n -e '\302\251'`" 1999 The Free Software Foundation"

SRCS		= \
				grep.c \
				regex.c \
				dfa.c \
				kwset.c \
				obstack.c \
				search.c

OBJS := $(SRCS_LIST_TO_OBJS)

$(TARGET):	$(OBJ_DIR) $(OBJS)
		$(LD) -o $@ $(OBJS) $(LDFLAGS)
		$(SETVERSION) $@ $(SYSTEM_VERSION) $(APP_VERSION)

install::	$(TARGET)
	rm -f $(INSTALL_BIN)/egrep
	ln -s grep $(INSTALL_BIN)/egrep
	rm -f $(INSTALL_BIN)/fgrep
	ln -s grep $(INSTALL_BIN)/fgrep	

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