head	1.8;
access;
symbols;
locks; strict;
comment	@# @;


1.8
date	97.01.04.20.24.29;	author morgan;	state Exp;
branches;
next	1.7;

1.7
date	96.11.10.20.12.09;	author morgan;	state Exp;
branches;
next	1.6;

1.6
date	96.09.05.06.30.14;	author morgan;	state Exp;
branches;
next	1.5;

1.5
date	96.08.09.05.38.57;	author morgan;	state Exp;
branches;
next	1.4;

1.4
date	96.06.02.08.07.11;	author morgan;	state Exp;
branches;
next	1.3;

1.3
date	96.05.26.15.48.57;	author morgan;	state Exp;
branches;
next	1.2;

1.2
date	96.05.26.04.01.46;	author morgan;	state Exp;
branches;
next	1.1;

1.1
date	96.04.05.05.16.28;	author morgan;	state Exp;
branches;
next	;


desc
@makefile for the filter module. It is intended to be used as a [2n
authentication module and will perform the task of inserting a
specified program filter between the invoking application and the
calling tty. This could be used for modular encryption, logging
a user's activity or perhaps debugging a network connection..?
I was reading Stevens' UNIX Network Programming and just started
thinking... Andrew.
@


1.8
log
@don't compile on solaris, make -> $(MAKE)
@
text
@#
# $Id: Makefile,v 1.7 1996/11/10 20:12:09 morgan Exp morgan $
#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
# $Log: Makefile,v $
# Revision 1.7  1996/11/10 20:12:09  morgan
# cross platform support
#
# Created by Andrew Morgan <morgan@@parc.power.net> 1996/3/11
#

ifeq ($(OS),solaris)

include ../dont_makefile

else

TITLE=pam_filter
FILTERS=upperLOWER
FILTERSDIR=$(SUPLEMENTED)/pam_filter
export FILTERSDIR

#

LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))

dynamic/%.o : %.c
	$(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@@

static/%.o : %.c
	$(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@@

ifdef DYNAMIC
LIBSHARED = $(TITLE).so
endif

ifdef STATIC
LIBSTATIC = lib$(TITLE).o
endif

####################### don't edit below #######################

dummy:
	@@echo "**** This is not a top-level Makefile "
	exit

#
# this is where we compile this module
#

all: dirs $(LIBSHARED) $(LIBSTATIC) register filters

dirs:
ifdef DYNAMIC
	$(MKDIR) ./dynamic
endif
ifdef STATIC
	$(MKDIR) ./static
endif

register:
ifdef STATIC
	( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
endif

filters:
	@@for i in $(FILTERS) ; do \
		if [ -d $$i ]; then \
		   $(MAKE) -C $$i all ; \
		fi \
	done


ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)
endif

ifdef DYNAMIC
$(LIBSHARED):	$(LIBOBJD)
		$(LD_D) -o $@@ $(LIBOBJD)
endif

ifdef STATIC
$(LIBOBJS): $(LIBSRC)
endif

ifdef STATIC
$(LIBSTATIC): $(LIBOBJS)
	$(LD) -r -o $@@ $(LIBOBJS)
endif

install: all
	@@for i in $(FILTERS) ; do \
		if [ -d $$i ]; then \
		   $(MAKE) -C $$i install ; \
		fi \
	done
	$(MKDIR) $(SECUREDIR)
ifdef DYNAMIC
	$(INSTALL) -m 644 $(LIBSHARED) $(SECUREDIR)
endif
	$(INSTALL) -m 644 include/pam_filter.h $(INCLUDED)

remove:
	rm -f $(SECUREDIR)/$(TITLE).so
	rm -f $(INCLUDED)/pam_filter.h
	@@for i in $(FILTERS) ; do \
		if [ -d $$i ]; then \
		   $(MAKE) -C $$i remove ; \
		fi \
	done

lclean:
	rm -f $(LIBSHARED) $(LIBOBJD) $(LIBOBJS) core *~

clean: lclean
	@@for i in $(FILTERS) ; do \
		if [ -d $$i ]; then \
		   $(MAKE) -C $$i clean ; \
		fi \
	done

extraclean: lclean
	@@rm -f *.a *.o *.so *.bak
	for i in $(FILTERS) ; do \
		if [ -d $$i ]; then \
		   $(MAKE) -C $$i extraclean ; \
		fi \
	done

.c.o:	
	$(CC) $(CFLAGS) -c $<

endif
@


1.7
log
@cross platform support
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.6 1996/09/05 06:30:14 morgan Exp morgan $
d9 2
a10 2
# Revision 1.6  1996/09/05 06:30:14  morgan
# ld --> gcc
d12 1
a12 8
# Revision 1.5  1996/08/09 05:38:57  morgan
# fixed installation dependencies
#
# Revision 1.4  1996/06/02 08:07:11  morgan
# heavily modified for static modules and new pam_filter program
#
#
# Created by Andrew Morgan <morgan@@physics.ucla.edu> 1996/3/11
d14 6
d53 4
d73 1
a73 1
	for i in $(FILTERS) ; do \
d75 1
a75 1
		   make -C $$i all ; \
d99 1
a99 1
	for i in $(FILTERS) ; do \
d101 1
a101 1
		   make -C $$i install ; \
d113 1
a113 1
	for i in $(FILTERS) ; do \
d115 1
a115 1
		   make -C $$i remove ; \
d123 1
a123 1
	for i in $(FILTERS) ; do \
d125 1
a125 1
		   make -C $$i clean ; \
d130 1
a130 1
	rm -f *.a *.o *.so *.bak
d133 1
a133 1
		   make -C $$i extraclean ; \
d140 1
@


1.6
log
@ld --> gcc
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.5 1996/08/09 05:38:57 morgan Exp morgan $
d9 3
d58 1
a58 1
	mkdir -p ./dynamic
d61 1
a61 1
	mkdir -p ./static
d101 1
a101 1
	mkdir -p $(SECUREDIR)
d103 1
a103 1
	install -m644 $(LIBSHARED) $(SECUREDIR)
d105 1
a105 1
	install -m644 include/pam_filter.h $(INCLUDED)
@


1.5
log
@fixed installation dependencies
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.4 1996/06/02 08:07:11 morgan Exp morgan $
d9 3
d80 1
a80 1
		$(LD) -x --shared -o $@@ $(LIBOBJD)
@


1.4
log
@heavily modified for static modules and new pam_filter program
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.3 1996/05/26 15:48:57 morgan Exp morgan $
d9 3
d18 1
a18 1
FILTERSDIR=/usr/sbin/pam_filter
d66 1
a66 2
		   make -C $$i all "CC=$(CC)" "CFLAGS=$(CFLAGS)" "AR=$(AR)" \
		   "LD=ld" "RANLIB=$(RANLIB)"; \
d92 1
a92 2
		   make -C $$i install "CC=$(CC)" "CFLAGS=$(CFLAGS)" \
			"AR=$(AR)" "LD=ld" "RANLIB=$(RANLIB)"; \
d99 1
a99 1
	install -m644 include/pam_filter.h $(INCLUDEDIR)
d103 1
a103 1
	rm -f $(INCLUDEDIR)/pam_filter.h
d110 1
a110 1
clean:
d112 2
d120 1
a120 1
extraclean: clean
@


1.3
log
@make dynamic and static dirs
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.2 1996/05/26 04:01:46 morgan Exp morgan $
a8 6
# Revision 1.2  1996/05/26 04:01:46  morgan
# automated static support
#
# Revision 1.1  1996/04/05 05:16:28  morgan
# Initial revision
#
d14 3
d45 1
a45 1
all: dirs $(LIBSHARED) $(LIBSTATIC) register
d60 9
d88 6
d98 1
d102 6
d111 5
d119 5
@


1.2
log
@automated static support
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.1 1996/04/05 05:16:28 morgan Exp morgan $
d9 3
d48 9
a56 1
all: $(LIBSHARED) $(LIBSTATIC) register
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
# $Id$
d8 4
a11 1
# $Log$
d22 5
d28 4
d33 5
a37 1
LIBSTATIC = lib$(TITLE).a
a41 1

d45 1
a45 4
all: $(LIBSHARED) $(LIBSTATIC)

$(LIBSHARED):	$(LIBOBJ)
		$(LD) -x --shared -o $@@ $(LIBOBJ)
d47 22
a68 3
$(LIBSTATIC): $(LIBOBJ)
	$(AR) $@@ $(LIBOBJ)
	$(RANLIB) $@@
d72 1
d74 1
d77 1
a77 1
	rm -f $(SECUREDIR)/$(LIBSHARED)
d80 1
a80 3
	rm -f $(LIBSHARED) $(LIBSTATIC) $(LIBOBJ) core *~

extraclean:
d82 1
a82 1
	@@make clean
@
