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


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

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

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

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

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

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


desc
@@


1.6
log
@cross platform support
@
text
@# This Makefile controls a build process of the pam_rhosts modules
# for Linux-PAM. You should not modify this Makefile.

LIBAUTHOBJ = pam_rhosts_auth.o
LIBAUTHSRC = pam_rhosts_auth.c
LIBSESSOBJ =
LIBSESSSRC =
LIBPASSWDSRC =
LIBPASSWDOBJ =
LIBOBJ = $(LIBAUTHOBJ) $(LIBSESSOBJ) $(LIBPASSWDOBJ)
LIBSRC = $(LIBAUTHSRC) $(LIBSESSSRC) $(LIBPASSWDSRC)

ifdef STATIC
LIBSTATIC = libpam_rhosts.o
LIBOBJS = $(addprefix static/,$(LIBOBJ))
endif

ifdef DYNAMIC
LIBSESSSH =
LIBAUTHSH = pam_rhosts_auth.so
LIBPASSWDSH =
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBSHARED = $(LIBSESSSH) $(LIBAUTHSH) $(LIBPASSWDSH)
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 pam_rhosts_auth pam_rhosts/libpam_rhosts.o )
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

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

install: all
ifdef DYNAMIC
	$(MKDIR) $(SECUREDIR)
	$(INSTALL) -m 644 $(LIBSHARED) $(SECUREDIR)
endif

# tidy up

remove:
	cd $(SECUREDIR) && rm -f $(LIBSHARED)

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

extraclean:
	rm -f *.a *.out *.o *.so *.bak dynamic/* static/*

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

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


1.5
log
@ld --> gcc
@
text
@d37 1
a37 1
	mkdir -p ./dynamic
d40 1
a40 1
	mkdir -p ./static
a56 1

d75 2
a76 2
	mkdir -p $(SECUREDIR)
	install -m644 $(LIBSHARED) $(SECUREDIR)
@


1.4
log
@make dynamic and static dirs
@
text
@d56 1
a56 1
	$(LD) -x --shared -o $@@ $(LIBOBJD)
@


1.3
log
@automated static support
@
text
@d33 9
a41 1
all: $(LIBSHARED) $(LIBSTATIC) register
@


1.2
log
@cleaned up remove entry
@
text
@a3 5
LIBSESSSH =
LIBAUTHSH = pam_rhosts_auth.so
LIBPASSWDSH =
LIBSTATIC = libpam_rhosts.a

d13 10
d24 1
a28 1

d33 23
a55 1
all: $(LIBSHARED) $(LIBSTATIC)
d57 3
a59 2
$(LIBAUTHSH):	$(LIBAUTHOBJ)
		$(LD) -x --shared -o $@@ $(LIBAUTHOBJ)
d61 1
a61 3
$(LIBSTATIC): $(LIBOBJ)
	$(AR) $@@ $(LIBOBJ)
	$(RANLIB) $@@
d63 2
a64 2
.c.o:	
	$(CC) -c $(CFLAGS) $<
d67 1
d70 1
d78 1
a78 1
	rm -f $(LIBSHARED) $(LIBSTATIC) $(LIBOBJ) a.out core *~
d81 1
d83 2
a84 2
	@@make clean
	rm -f *.a *.out *.o *.so *.bak
d86 2
@


1.1
log
@Initial revision
@
text
@d47 1
a47 1
	rm -f $(SECUREDIR)/$(LIBSHARED)
@
