xref: /illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com (revision 2efb3bf9c7f4cf34038896f1431531c93d3f57c2)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY= libdb2.a
27VERS= .1
28
29# btree
30BTREE_OBJS= \
31	bt_close.o \
32	bt_conv.o \
33	bt_debug.o \
34	bt_delete.o \
35	bt_get.o \
36	bt_open.o \
37        bt_overflow.o \
38	bt_page.o \
39	bt_put.o \
40	bt_search.o \
41	bt_seq.o \
42	bt_split.o \
43        bt_utils.o
44
45# db
46DB_OBJS= db.o
47
48# hash
49HASH_OBJS= \
50	hash.o \
51	hash_bigkey.o \
52	hash_func.o \
53	hash_log2.o \
54	hash_page.o \
55	hsearch.o \
56	dbm.o
57
58# mpool
59MPOOL_OBJS= mpool.o
60
61# recno
62RECNO_OBJS= \
63	rec_close.o \
64	rec_delete.o \
65	rec_get.o \
66	rec_open.o \
67	rec_put.o \
68	rec_search.o \
69	rec_seq.o \
70	rec_utils.o
71
72OBJECTS= \
73	$(BTREE_OBJS) $(DB_OBJS) $(HASH_OBJS) $(MPOOL_OBJS) $(RECNO_OBJS)
74
75# include library definitions
76include $(SRC)/lib/krb5/Makefile.lib
77
78SRCS=	$(BTREE_OBJS:%.o=../btree/%.c) \
79	$(DB_OBJS:%.o=../db/%.c) \
80	$(HASH_OBJS:%.o=../hash/%.c) \
81	$(MPOOL_OBJS:%.o=../mpool/%.c) \
82	$(RECNO_OBJS:%.o=../recno/%.c)
83
84LIBS=		$(DYNLIB)
85
86include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
87
88POFILE = $(LIBRARY:%.a=%.po)
89POFILES = generic.po
90
91#override liblink
92INS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
93
94CPPFLAGS += 	-DHAVE_CONFIG_H \
95		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/mpool \
96		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/db \
97		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/hash \
98		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/btree \
99		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/recno \
100		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/include \
101		-I$(SRC)/lib/gss_mechs/mech_krb5/include  #for db-ndbm.h
102
103CFLAGS +=	$(CCVERBOSE) -I..
104CERRWARN +=	-_gcc=-Wno-uninitialized
105LDLIBS +=	-lc
106
107# Identify that this library is an interposer (on dbm_ routines from libc.so.1).
108# This identification insures runtime symbol lookup resolves to this library
109# (before libc.so.1) regardless of dependency link order.
110DYNFLAGS +=	$(ZINTERPOSE)
111
112.KEEP_STATE:
113
114all:	$(LIBS)
115
116lint:	lintcheck
117
118# include library targets
119include $(SRC)/lib/krb5/Makefile.targ
120
121pics/%.o: ../btree/%.c
122	$(COMPILE.c)  -o $@ $<
123	$(POST_PROCESS_O)
124
125pics/%.o: ../db/%.c
126	$(COMPILE.c)  -o $@ $<
127	$(POST_PROCESS_O)
128
129pics/%.o: ../hash/%.c
130	$(COMPILE.c)  -o $@ $<
131	$(POST_PROCESS_O)
132
133pics/%.o: ../mpool/%.c
134	$(COMPILE.c)  -o $@ $<
135	$(POST_PROCESS_O)
136
137pics/%.o: ../recno/%.c
138	$(COMPILE.c)  -o $@ $<
139	$(POST_PROCESS_O)
140
141FRC:
142
143generic.po: FRC
144	$(RM) messages.po
145	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../hash/*.[ch]`
146	$(SED) "/^domain/d" messages.po > $@
147	$(RM) messages.po
148