aboutsummaryrefslogtreecommitdiff
path: root/contrib/libpam/modules/pam_tally/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpam/modules/pam_tally/Makefile')
-rw-r--r--contrib/libpam/modules/pam_tally/Makefile54
1 files changed, 32 insertions, 22 deletions
diff --git a/contrib/libpam/modules/pam_tally/Makefile b/contrib/libpam/modules/pam_tally/Makefile
index ec17ff31fa8e..032b93416bd9 100644
--- a/contrib/libpam/modules/pam_tally/Makefile
+++ b/contrib/libpam/modules/pam_tally/Makefile
@@ -1,20 +1,19 @@
#
-# $Id: Makefile,v 1.1 1997/04/05 06:19:04 morgan Exp $
+# $Id: Makefile,v 1.2 2000/11/19 23:54:05 agmorgan Exp $
#
-# 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.1 1997/04/05 06:19:04 morgan
-# Initial revision
+# This Makefile controls a build process of $(TITLE) module and
+# application for Linux-PAM. You should not modify this Makefile
+# (unless you know what you are doing!).
#
#
+include ../../Make.Rules
+
TITLE=pam_tally
#
-## Should add some more rules to make the application too.
+## Additional rules for making (and moving) the application added.
+## Assuming that all modules' applications are called $TITLE
#
LIBSRC = $(TITLE).c
@@ -22,6 +21,11 @@ LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))
+APPSRC = $(TITLE)_app.c
+APPOBJ = $(TITLE)_app.o
+APPOBJD = $(addprefix dynamic/,$(APPOBJ))
+APPOBJS = $(addprefix static/,$(APPOBJ))
+
dynamic/%.o : %.c
$(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
@@ -37,14 +41,12 @@ ifdef STATIC
LIBSTATIC = lib$(TITLE).o
endif
-####################### don't edit below #######################
+APPLICATION = $(TITLE)
+APPMODE = 755
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+####################### don't edit below #######################
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
+all: dirs $(LIBSHARED) $(LIBSTATIC) register $(APPLICATION)
dirs:
ifdef DYNAMIC
@@ -62,8 +64,12 @@ endif
ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)
-$(LIBSHARED): $(LIBOBJD)
+$(LIBSHARED): $(LIBOBJD)
$(LD_D) -o $@ $(LIBOBJD)
+
+$(APPLICATION): $(APPOBJD)
+ $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
+
endif
ifdef STATIC
@@ -71,6 +77,9 @@ $(LIBOBJS): $(LIBSRC)
$(LIBSTATIC): $(LIBOBJS)
$(LD) -r -o $@ $(LIBOBJS)
+
+$(APPLICATION): $(APPOBJS)
+ $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
endif
install: all
@@ -78,16 +87,17 @@ install: all
ifdef DYNAMIC
$(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
endif
+ $(MKDIR) $(FAKEROOT)$(SUPLEMENTED)
+# $(INSTALL) -m $(APPMODE) $(APPLICATION) $(FAKEROOT)$(SUPLEMENTED)
remove:
rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
+ rm -f $(FAKEROOT)$(SUPLEMENTED)/$(TITLE)
clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
+ rm -f $(LIBOBJD) $(LIBOBJS) $(APPOBJD) $(APPOBJS) core *~
+ rm -f *.a *.o *.so *.bak dynamic/* static/* $(APPLICATION)
+ rm -rf dynamic static
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
+.c.o:
$(CC) $(CFLAGS) -c $<
-