diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-12-09 22:15:11 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-12-09 22:15:11 +0000 |
commit | da67a7d6126846939fd43b1ddb5aa8c06ee09301 (patch) | |
tree | e9df9e69023b0e8584ee85cd8a44daf210bee75d /modules/pammodutil/Makefile | |
parent | cb7734d4080f3673a34594ee4c6e7b02dcd89f33 (diff) |
Relevant BUGIDs: 490938
Purpose of commit: new feature
Commit summary:
---------------
Added libpammodutil and link it with every module as its built.
The issue here is that there is a lot of code that the various modules
use in common, and this staic library can be used to help make this code
more maintainable. I do not intend to make this library dynamic. Especially
right now, as I want to be free to chop and change the API and don't want
to deal with revision control and third party modules.
This checkin makes the pam_rhost_auth module make some use of this new
library. I don't intend to add support for any other module prior to
releasing 0.76.
Diffstat (limited to 'modules/pammodutil/Makefile')
-rw-r--r-- | modules/pammodutil/Makefile | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/modules/pammodutil/Makefile b/modules/pammodutil/Makefile new file mode 100644 index 00000000..a97388ef --- /dev/null +++ b/modules/pammodutil/Makefile @@ -0,0 +1,53 @@ +# +# $Id$ +# +# + +include ../../Make.Rules + +LIBNAME=libpammodutil + +# --------------------------------------------- + +dummy: all + +# --------------------------------------------- + +CFLAGS += $(PIC) $(STATIC) $(MOREFLAGS) \ + -DLIBPAM_VERSION_MAJOR=$(MAJOR_REL) \ + -DLIBPAM_VERSION_MINOR=$(MINOR_REL) + +# all the object files we care about +LIBOBJECTS = modutil_cleanup.o modutil_getpwnam.o modutil_getpwuid.o + +# static library name +LIBSTATIC = $(LIBNAME).a + +SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS) $(STATICOBJ)) + +# --------------------------------------------- +## rules + +all: dirs $(LIBSTATIC) ../../Make.Rules + +dirs: + $(MKDIR) static + +static/%.o : %.c + $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ + +$(LIBSTATIC): $(SLIBOBJECTS) + ar cr $@ $(SLIBOBJECTS) + $(RANLIB) $@ + +install: + @echo "at this time, we're not installing $(LIBSTATIC)" + +remove: + @echo "at this time, there is nothing to remove" + +clean: + rm -f a.out core *~ static/*.o + rm -f *.a *.o + if [ -d dynamic ]; then rmdir dynamic ; fi + if [ -d static ]; then rmdir static ; fi |