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


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

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

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

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


desc
@makefile for pam_time
@


1.4
log
@cross platform support
@
text
@#
# $Id: Makefile,v 1.3 1996/09/05 06:27:37 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.3  1996/09/05 06:27:37  morgan
# ld --> gcc
#
# Revision 1.2  1996/08/09 05:48:19  morgan
# inherit installation files from parent
#
# Revision 1.1  1996/07/07 23:42:48  morgan
# Initial revision
#
# Revision 1.1  1996/06/24 05:48:49  morgan
# Initial revision
#
#
# Created by Andrew Morgan <morgan@@physics.ucla.edu> 1996/6/11
#

TITLE=pam_time
CONFD=$(CONFIGED)/security
export CONFD
CONFILE=$(CONFD)/time.conf
export CONFILE

#

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

DEFS=-DCONFILE=\"$(CONFILE)\"

CFLAGS += $(DEFS)

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

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

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

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

ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)

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

ifdef STATIC
$(LIBOBJS): $(LIBSRC)

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

install: all
	$(MKDIR) $(SECUREDIR)
ifdef DYNAMIC
	$(INSTALL) -m 644 $(LIBSHARED) $(SECUREDIR)
endif
	bash -f ./install_conf

remove:
	rm -f $(SECUREDIR)/$(TITLE).so
	rm -f $(CONFILE)

clean:
	rm -f $(LIBOBJD) $(LIBOBJS) core *~
	rm -f ./.ignore_age

extraclean: clean
	rm -f *.a *.o *.so *.bak

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

@


1.3
log
@ld --> gcc
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.2 1996/08/09 05:48:19 morgan Exp morgan $
d9 3
d66 1
a66 1
	mkdir -p ./dynamic
d69 1
a69 1
	mkdir -p ./static
d92 1
a92 1
	mkdir -p $(SECUREDIR)
d94 1
a94 1
	install -m644 $(LIBSHARED) $(SECUREDIR)
d96 1
a96 1
	./install_conf
@


1.2
log
@inherit installation files from parent
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.1 1996/07/07 23:42:48 morgan Exp morgan $
d9 3
d78 1
a78 1
		$(LD) -x --shared -o $@@ $(LIBOBJD)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.3 1996/05/26 15:48:38 morgan Exp $
d9 6
d20 4
d32 4
a89 1
	mkdir -p /etc/security
d94 1
a94 1
	rm -f /etc/security/time.conf
d98 1
a98 1
	rm -f .ignore_age
@
