1# OpenLDAP: pkg/ldap/build/mod.mk,v 1.25.2.5 2010/04/13 20:22:21 kurt Exp 2## This work is part of OpenLDAP Software <http://www.openldap.org/>. 3## 4## Copyright 1998-2010 The OpenLDAP Foundation. 5## All rights reserved. 6## 7## Redistribution and use in source and binary forms, with or without 8## modification, are permitted only as authorized by the OpenLDAP 9## Public License. 10## 11## A copy of this license is available in the file LICENSE in the 12## top-level directory of the distribution or, alternatively, at 13## <http://www.OpenLDAP.org/license.html>. 14##--------------------------------------------------------------------------- 15# 16# Makefile Template for Server Modules 17# 18 19LIBRARY = $(LIBBASE).la 20LIBSTAT = lib$(LIBBASE).a 21 22MKDEPFLAG = -l 23 24.SUFFIXES: .c .o .lo 25 26.c.lo: 27 $(LTCOMPILE_MOD) $< 28 29all-no lint-no 5lint-no depend-no install-no: FORCE 30 @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)" 31 32all-common: all-$(BUILD_MOD) 33 34version.c: Makefile 35 $(RM) $@ 36 $(MKVERSION) $(LIBBASE) > $@ 37 38version.lo: version.c $(OBJS) 39 40$(LIBRARY): version.lo 41 $(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS) 42 43$(LIBSTAT): version.lo 44 $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o 45 @$(RANLIB) $@ 46 47clean-common: clean-lib FORCE 48veryclean-common: veryclean-lib FORCE 49 50 51lint-common: lint-$(BUILD_MOD) 52 535lint-common: 5lint-$(BUILD_MOD) 54 55depend-common: depend-$(BUILD_MOD) 56 57install-common: install-$(BUILD_MOD) 58 59all-local-mod: 60all-mod: $(LIBRARY) all-local-mod FORCE 61 62all-local-lib: 63all-yes: $(LIBSTAT) all-local-lib FORCE 64 65install-mod: $(LIBRARY) 66 @-$(MKDIR) $(DESTDIR)$(moduledir) 67 $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir) 68 69install-local-lib: 70install-yes: install-local-lib FORCE 71 72lint-local-lib: 73lint-yes lint-mod: lint-local-lib FORCE 74 $(LINT) $(DEFS) $(DEFINES) $(SRCS) 75 765lint-local-lib: 775lint-yes 5lint-mod: 5lint-local-lib FORCE 78 $(5LINT) $(DEFS) $(DEFINES) $(SRCS) 79 80clean-local-lib: 81clean-lib: clean-local-lib FORCE 82 $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/* 83 84depend-local-lib: 85depend-yes depend-mod: depend-local-lib FORCE 86 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) 87 88veryclean-local-lib: 89veryclean-lib: clean-lib veryclean-local-lib 90 91Makefile: $(top_srcdir)/build/mod.mk 92 93