# Makefile for regular expresion
#
# cdev regexp directory (not for hp)
#
# Makefile,v
# Revision 1.8  1996/09/20  12:24:58  akers
# Changes added for Release 1.4
#
# Revision 1.5  1996/06/26  15:54:20  akers
# Modifications to support multiple OS Versions
#
# Revision 1.4  1996/05/14  20:38:22  akers
# Makefile modifications
#
# Revision 1.3  1996/03/22  16:37:42  chen
# support solaris
#
# Revision 1.2  1995/11/14  17:45:56  chen
# new makefile
#
#
include ../Makefile.config

ifeq ($(SHOBJ),YES)
	OBJTYPE=.shobj/$(TARGETDIR)
else
	OBJTYPE=.obj/$(TARGETDIR)
endif

SRC = regexp.c regsub.c regerror.c
OBJS = $(OBJTYPE)/regexp.o \
	$(OBJTYPE)/regsub.o \
	$(OBJTYPE)/regerror.o

ifeq ($(INCDIR), )
	INCDIR = ../..
endif

ifeq ($(OS_TYPE), BSD)
targets: $(OBJTYPE) $(OBJDIR)/$(OBJTYPE) copyobjs copyincs
else
targets:
endif

$(OBJTYPE) :
	@mkdir -p $(OBJTYPE)

		
$(OBJDIR)/$(OBJTYPE) :
	@mkdir $(OBJDIR)/$(OBJTYPE)
			
regexpTest: $(OBJS) regexpTest.o
	rm -f $@
	$(CC) -o $@ regexpTest.o $(OBJS)	

copyobjs: $(OBJS)
	@cp -f $(OBJS) $(OBJDIR)/$(OBJTYPE)

copyincs:
	@cp -f *.h $(INCDIR)

clean: clean_hail
	@rm -rf *.o .obj .shobj core *~ regexpTest
