CFLAGS = $(CCOPT) ${INCLUDE} -c

GISHLIB = ../lib/libgish.a

SRC = ucasemap.c lcasemap.c str_cchr.c str_ccmp.c str_cstr.c \
	str_cpre.c str_chr.c str_str.c \
	str_nccm.c str_ncin.c str_ncpr.c \
	str_nstr.c str_npre.c str_pref.c str_rcch.c \
	str_rchr.c str_mov.c str_nmov.c \
	str_tolo.c str_toup.c str_tok.c \
	str_spn.c str_cspn.c str_pbrk.c str_dup.c str_rcmp.c str_nrcm.c \
	str_trim.c str_cnt.c str_ccnt.c str_tr.c

OBJ = ucasemap.o lcasemap.o str_cchr.o str_ccmp.o str_cstr.o \
	str_cpre.o str_chr.o str_str.o \
	str_nccm.o str_ncin.o str_ncpr.o \
	str_nstr.o str_npre.o str_pref.o str_rcch.o \
	str_rchr.o str_mov.o str_nmov.o \
	str_tolo.o str_toup.o str_tok.o \
	str_spn.o str_cspn.o str_pbrk.o str_dup.o str_rcmp.o str_nrcm.o \
	str_trim.o str_cnt.o str_ccnt.o str_tr.o


all: $(OBJ)
	ar $(ARFLAGS) $(GISHLIB) $(OBJ)

clean:
	rm -f makefile makefile.old $(OBJ)

depend: makefile

makefile: Makefile $(SRC)
	- mv -f makefile makefile.old
	@ sed -n -e '1,/[D]O NOT MAKE ANY CHANGES/p' Makefile > makefile
	@ echo "" >> makefile
	@ $(CC) ${MKDEPFLAG} ${INCLUDE} ${SRC} >> makefile

#DO NOT MAKE ANY CHANGES ON OR AFTER THIS LINE
