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


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

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

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

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

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

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


desc
@makefile for pam_permit module
@


1.6
log
@cross platform support
@
text
@#
# $Id: Makefile,v 1.5 1996/09/05 06:32:45 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.5  1996/09/05 06:32:45  morgan
# ld --> gcc
#
# Revision 1.4  1996/05/26 15:49:25  morgan
# make dynamic and static dirs
#
# Revision 1.3  1996/05/26 04:04:26  morgan
# automated static support
#
# Revision 1.2  1996/03/16 17:56:38  morgan
# tidied up
#
#
# Created by Andrew Morgan <morgan@@physics.ucla.edu> 1996/3/11
#

TITLE=pam_permit

#

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

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)
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
	$(MKDIR) $(SECUREDIR)
ifdef DYNAMIC
	$(INSTALL) -m 644 $(LIBSHARED) $(SECUREDIR)
endif

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

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

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

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

@


1.5
log
@ld --> gcc
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.4 1996/05/26 15:49:25 morgan Exp morgan $
d9 3
d59 1
a59 1
	mkdir -p ./dynamic
d62 1
a62 1
	mkdir -p ./static
d89 1
a89 1
	mkdir -p $(SECUREDIR)
d91 1
a91 1
	install -m644 $(LIBSHARED) $(SECUREDIR)
@


1.4
log
@make dynamic and static dirs
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.3 1996/05/26 04:04:26 morgan Exp morgan $
d9 3
d73 1
a73 1
		$(LD) -x --shared -o $@@ $(LIBOBJD)
@


1.3
log
@automated static support
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.2 1996/03/16 17:56:38 morgan Exp morgan $
d9 3
d49 9
a57 1
all: $(LIBSHARED) $(LIBSTATIC) register
@


1.2
log
@tidied up
@
text
@d2 1
a2 1
# $Id$
d8 4
a11 1
# $Log$
d22 9
d32 1
d34 5
a38 1
LIBSTATIC = lib$(TITLE).a
a42 1

d46 1
a46 1
all: $(LIBSHARED) $(LIBSTATIC)
d48 22
a69 6
$(LIBSHARED):	$(LIBOBJ)
		$(LD) -x --shared -o $@@ $(LIBOBJ)

$(LIBSTATIC): $(LIBOBJ)
	$(AR) $@@ $(LIBOBJ)
	$(RANLIB) $@@
d73 1
d75 1
d78 1
a78 1
	rm -f $(SECUREDIR)/$(LIBSHARED)
d81 1
a81 3
	rm -f $(LIBSHARED) $(LIBSTATIC) $(LIBOBJ) core *~

extraclean:
d83 1
a83 1
	@@make clean
@


1.1
log
@Initial revision
@
text
@d4 3
a6 2
# This Makefile controls a build process of pam_test module for
# Linux-PAM. You should not modify this Makefile.
d13 1
a13 2
LIBTESTSH = pam_permit.so
LIBSTATIC = libpam_permit.a
d15 1
a15 2
LIBPERMITOBJ = pam_permit.o
LIBPERMITSRC = pam_permit.c
d17 2
a18 2
LIBOBJ = $(LIBTESTOBJ)
LIBSRC = $(LIBTESTSRC)
d20 2
a21 1
LIBSHARED = $(LIBPERMITSH)
d32 2
a33 2
$(LIBTESTSH):	$(LIBTESTOBJ)
		$(LD) -x --shared -o $@@ $(LIBTESTOBJ)
d43 3
d47 1
a47 1
	rm -f $(LIBSHARED) $(LIBSTATIC) $(LIBOBJ) a.out core *~
d52 1
a52 1
	rm -f *.a *.out *.o *.so *.bak
d55 1
a55 1
	$(CC) -c $(CFLAGS) $<
@
