1
# $OpenLDAP: pkg/ldap/build/mod.mk,v 1.25.2.3 2008/02/11 23:26:37 kurt Exp $
2
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
## Copyright 1998-2008 The OpenLDAP Foundation.
5
## All rights reserved.
7
## Redistribution and use in source and binary forms, with or without
8
## modification, are permitted only as authorized by the OpenLDAP
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
##---------------------------------------------------------------------------
16
# Makefile Template for Server Modules
19
LIBRARY = $(LIBBASE).la
20
LIBSTAT = lib$(LIBBASE).a
29
all-no lint-no 5lint-no depend-no install-no: FORCE
30
@echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
32
all-common: all-$(BUILD_MOD)
36
$(MKVERSION) $(LIBBASE) > $@
38
version.lo: version.c $(OBJS)
40
$(LIBRARY): version.lo
41
$(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
43
$(LIBSTAT): version.lo
44
$(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
47
clean-common: clean-lib FORCE
48
veryclean-common: veryclean-lib FORCE
51
lint-common: lint-$(BUILD_MOD)
53
5lint-common: 5lint-$(BUILD_MOD)
55
depend-common: depend-$(BUILD_MOD)
57
install-common: install-$(BUILD_MOD)
60
all-mod: $(LIBRARY) all-local-mod FORCE
63
all-yes: $(LIBSTAT) all-local-lib FORCE
65
install-mod: $(LIBRARY)
66
@-$(MKDIR) $(DESTDIR)$(moduledir)
67
$(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
70
install-yes: install-local-lib FORCE
73
lint-yes lint-mod: lint-local-lib FORCE
74
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
77
5lint-yes 5lint-mod: 5lint-local-lib FORCE
78
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
81
clean-lib: clean-local-lib FORCE
82
$(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
85
depend-yes depend-mod: depend-local-lib FORCE
86
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
89
veryclean-lib: clean-lib veryclean-local-lib
91
Makefile: $(top_srcdir)/build/mod.mk