######################################################################
# Copyright (C) 1998  Andrey V. Savochkin <saw@msu.ru>
#
# Makefile for pniam_pwd module of PNIAM package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the LGPL.  See COPYING file for details.
#
# $Id: Makefile,v 1.4 1998/11/13 10:08:23 saw Rel $
#
######################################################################

PWDSONAME = pwnew

all: library pniam_pwd.so

library:
	$(MAKE) -C $(PWDLIBPATH) lib$(PWDSONAME).so

pniam_pwd.so: pniam_pwd.c
	gcc -shared -o $(@) $(CFLAGS) $(COPTFLAGS) -I$(HPATH) -I$(PWDINCPATH) $(<) -L$(LPATH) -L$(PWDLIBPATH) -lpniam -l$(PWDSONAME) -lcrypt

clean:
ifeq ($(strip $(PWDLIBPATH)),pwdlib)
	$(MAKE) -C pwdlib $(@)
endif
	rm -f pniam_pwd.so

.PHONY: all clean library
