#
# ~ppr/src/libpprdb/Makefile
# Copyright 1995, 1996, Trinity College Computing Center.
# Written by David Chappell.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation.  This software is provided "as is" without express or
# implied warranty.
#
# This file was last modified 19 February 1996.
#

include ../../include/global.mk

all: ../../libpprdb.$(LIBEXT)

install: ../../libpprdb.$(LIBEXT)

# notice absence of space after $(LIBCMD)
../../libpprdb.$(LIBEXT): dbauth.$(OBJ) dbtrans.$(OBJ) dbmod.$(OBJ) \
		dbstrlower.$(OBJ)
	rm -f ../libpprdb.$(LIBEXT)
	$(LIBCMD) ../../libpprdb.$(LIBEXT) >/dev/null 2>&1
	$(LIBCMD) ../../libpprdb.$(LIBEXT) dbauth.$(OBJ) dbtrans.$(OBJ) \
		dbmod.$(OBJ) dbstrlower.$(OBJ)

dbauth.$(OBJ): dbauth.c ../../include/userdb.h ../../include/global_defines.h
	$(CC) -I ../../include $(CFLAGS) -c dbauth.c

dbtrans.$(OBJ): dbtrans.c ../../include/userdb.h ../../include/global_defines.h
	$(CC) -I ../../include $(CFLAGS) -c dbtrans.c

dbmod.$(OBJ): dbmod.c ../../include/userdb.h ../../include/global_defines.h
	$(CC) -I ../../include $(CFLAGS) -c dbmod.c

dbstrlower.$(OBJ): dbstrlower.c ../../include/global_defines.h
	$(CC) -I ../../include $(CFLAGS) -c dbstrlower.c

# clean up
clean:
	rm -f *.$(OBJ) *.bak *~ ../../libpprdb.$(LIBEXT)

# end of file
