#   File   : strings.d/Makefile
#   Author : Richard A. O'Keefe.
#   Updated: 2 June 1984.
#   Purpose: UNIX make(1)file for the strings library.
#
# Updated again April 18th, 1990 to become a more general libc.a replacement
# by Jordan K. Hubbard
#
#
#   If you are not using a Vax, or if your strings might be 2^16
#   characters long or longer, use
#   CFLAGS=-O
#   On the Vax we can use the string instructions some but not all the time.

CFLAGS=-O -DPC532 -DSTANDALONE -pipe -DDEBUG -DRCHECK
CC = cc32k
AS = as32k
AR = ar32k -a
RM = rm -f
RANLIB = ranlib32k
INSTALL = cp

DEST = /usr/local/lib/32k

OBJS=	strcat.o strncat.o strcmp.o strncmp.o strcpy.o strncpy.o strlen.o \
	strchr.o strrchr.o strpbrk.o strspn.o strcspn.o strtok.o \
	_c2type.o str2int.o getopt.o memccpy.o memchr.o memcmp.o \
	memcpy.o memmov.o memrchr.o memset.o regexp.o bcmp.o bcopy.o bfill.o \
	bmove.o bzero.o ffs.o strxcat.o strxcpy.o strxmov.o strxncat.o \
	strxncpy.o strxnmov.o strmov.o strnmov.o strrpt.o strnrpt.o strend.o \
	strnlen.o strcpbrk.o strpack.o strcpack.o strtrans.o strntrans.o \
	strpref.o strsuff.o strtrim.o strctrim.o strfield.o strkey.o \
	int2str.o substr.o strnend.o strrev.o strnrev.o _str2map.o \
	_str2set.o memmov.o memrchr.o memrev.o strfind.o strrepl.o strsed.o \
	sys.o malloc.o rand.o

libc.a: $(OBJS)
	$(RM) libc.a; $(AR) libc.a *.o; $(RANLIB) libc.a

strsed.o: strsed.c
	$(CC) -DHS_REGEX -DFWRD_STATIC=static -I. -c $(CFLAGS) strsed.c

clean:
	$(RM) *.o libc.a *~ #*

#   The compilations should be done with the sources and headers in the
#   same directory.  However, users should find everything in the proper
#   places: /usr/include/{strings,memory}.h and /usr/lib/strings.a
#   /usr/local/lib would be ok.  Why is there no /usr/local/include?

install:: libc.a
	cp regexp.h memory.h strings.h ctypes.h errno.h $(DEST)/gcc-include
	$(INSTALL) libc.a $(DEST)

# DO NOT DELETE THIS LINE -- make depend depends on it.

_str2map.o: strings.h memory.h _str2map.h
_str2pat.o: strings.h memory.h _str2pat.h
_str2set.o: strings.h memory.h _str2set.h
bcmp.o: strings.h memory.h
bcopy.o: strings.h memory.h
bfill.o: strings.h memory.h
bmove.o: strings.h memory.h
bzero.o: strings.h memory.h
ffs.o: strings.h memory.h
getopt.o: /usr/include/stdio.h strings.h memory.h
int2str.o: strings.h memory.h
malloc.o: /usr/include/signal.h /usr/include/sys/signal.h
memccpy.o: strings.h memory.h
memchr.o: strings.h memory.h
memcpy.o: strings.h memory.h
memmov.o: strings.h memory.h
memrchr.o: strings.h memory.h
memrev.o: strings.h memory.h
memset.o: strings.h memory.h
memtrans.o: strings.h memory.h _str2map.h
regexp.o: /usr/include/stdio.h regexp.h regmagic.h
str2int.o: strings.h memory.h ctypes.h errno.h
strcat.o: strings.h memory.h
strchr.o: strings.h memory.h
strcmp.o: strings.h memory.h
strcpack.o: strings.h memory.h _str2set.h
strcpbrk.o: strings.h memory.h _str2set.h
strcpy.o: strings.h memory.h
strcspn.o: strings.h memory.h _str2set.h
strctrim.o: strings.h memory.h _str2set.h
strend.o: strings.h memory.h
strfield.o: strings.h memory.h
strfind.o: strings.h memory.h _str2pat.h
strings.o: memory.h
strkey.o: strings.h memory.h
strlen.o: strings.h memory.h
strmov.o: strings.h memory.h
strncat.o: strings.h memory.h
strncmp.o: strings.h memory.h
strncpy.o: strings.h memory.h
strnend.o: strings.h memory.h
strnlen.o: strings.h memory.h
strnmov.o: strings.h memory.h
strnrev.o: strings.h memory.h
strnrpt.o: strings.h memory.h
strntrans.o: strings.h memory.h _str2map.h
strpack.o: strings.h memory.h _str2set.h
strpbrk.o: strings.h memory.h _str2set.h
strpref.o: strings.h memory.h
strrchr.o: strings.h memory.h
strrepl.o: strings.h memory.h _str2pat.h
strrev.o: strings.h memory.h
strrpt.o: strings.h memory.h
strsed.o: /usr/include/ctype.h /usr/include/string.h
strspn.o: strings.h memory.h _str2set.h
strsuff.o: strings.h memory.h
strtok.o: strings.h memory.h _str2set.h
strtrans.o: strings.h memory.h _str2map.h
strtrim.o: strings.h memory.h _str2set.h
strxcat.o: strings.h memory.h /usr/include/varargs.h
strxcpy.o: strings.h memory.h /usr/include/varargs.h
strxmov.o: strings.h memory.h /usr/include/varargs.h
strxncat.o: strings.h memory.h /usr/include/varargs.h
strxncpy.o: strings.h memory.h /usr/include/varargs.h
strxnmov.o: strings.h memory.h /usr/include/varargs.h
substr.o: strings.h memory.h errno.h
