#
# ~ppr/src/ppop/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 2 February 1996.
#

include ../include/global.mk

ppop$(DOTEXE): ppop.$(OBJ) ppop_cmds_listq.$(OBJ) ppop_cmds_other.$(OBJ) \
		../libppr.$(LIBEXT)
	$(CC) $(CFLAGS) -o ppop$(DOTEXE) ppop.$(OBJ) ppop_cmds_listq.$(OBJ) \
		ppop_cmds_other.$(OBJ) ../libppr.$(LIBEXT)
	$(STRIP) ppop$(DOTEXE)
	chmod 4711 ppop$(DOTEXE)

ppop.$(OBJ): ppop.c ../include/global_defines.h ../include/global_structs.h \
		../include/pprd.h ../include/ppop.h ../include/util_exits.h \
		../include/version.h
	$(CC) $(CFLAGS) -c ppop.c

ppop_cmds_listq.$(OBJ): ppop_cmds_listq.c ../include/global_defines.h \
		../include/global_structs.h \
		../include/pprd.h ../include/ppop.h ../include/util_exits.h
	$(CC) $(CFLAGS) -c ppop_cmds_listq.c

ppop_cmds_other.$(OBJ): ppop_cmds_other.c ../include/global_defines.h \
		../include/global_structs.h \
		../include/pprd.h ../include/ppop.h ../include/util_exits.h
	$(CC) $(CFLAGS) -c ppop_cmds_other.c

# Copy into bin, make setuid.
install: $(HOMEDIR)/bin/ppop$(DOTEXE)

$(HOMEDIR)/bin/ppop$(DOTEXE): ppop$(DOTEXE)
	rm -f $(HOMEDIR)/bin/ppop$(DOTEXE)
	cp ppop $(HOMEDIR)/bin/ppop$(DOTEXE)
	chmod 4711 $(HOMEDIR)/bin/ppop$(DOTEXE)

# clean up
clean:
	rm -f *.o *.bak *~ ppop$(DOTEXE)

# end of file
