###
# This program is copyright Alec Muffett 1993. The author disclaims all
# responsibility or liability with respect to it's usage or its effect
# upon hardware or computer systems, and maintains copyright as set out
# in the "LICENCE" document which accompanies distributions of Crack v4.0
# and upwards.
###

LIB	= libcrack.so
OBJ	= fascist.o packlib.o rules.o stringlib.o
CFLAGS	= $(RPM_OPT_FLAGS) -g -I../cracklib -DIN_CRACKLIB -fPIC
LD	= ld
includedir  = /usr/include
libdir      = /usr/lib

$(LIB):	$(OBJ) Makefile
	$(LD) -shared -soname $(LIB).$(MAJOR) -o $(LIB).$(VERSION) $(OBJ) -lc
	rm -f $(LIB).$(MAJOR) $(LIB)
	ln -s $(LIB).$(VERSION) $(LIB).$(MAJOR)
	ln -s $(LIB).$(MAJOR) $(LIB)

clean:
	-rm -f $(OBJ) $(LIB) $(LIB).$(VERSION) *~

install: $(LIB) crack.h
	install -m 755 $(LIB).$(VERSION) $(ROOT)$(libdir)
	ln -sf $(LIB).$(VERSION) $(ROOT)$(libdir)/$(LIB)
	install -m 644 crack.h $(ROOT)$(includedir)
