xref: /illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com (revision 8b80e8cb6855118d46f605e91b5ed4ce83417395)
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# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY= libdb2.a
29VERS= .1
30
31# btree
32BTREE_OBJS= \
33	bt_close.o \
34	bt_conv.o \
35	bt_debug.o \
36	bt_delete.o \
37	bt_get.o \
38	bt_open.o \
39        bt_overflow.o \
40	bt_page.o \
41	bt_put.o \
42	bt_search.o \
43	bt_seq.o \
44	bt_split.o \
45        bt_utils.o
46
47# db
48DB_OBJS= db.o
49
50# hash
51HASH_OBJS= \
52	hash.o \
53	hash_bigkey.o \
54	hash_func.o \
55	hash_log2.o \
56	hash_page.o \
57	hsearch.o \
58	dbm.o
59
60# mpool
61MPOOL_OBJS= mpool.o
62
63# recno
64RECNO_OBJS= \
65	rec_close.o \
66	rec_delete.o \
67	rec_get.o \
68	rec_open.o \
69	rec_put.o \
70	rec_search.o \
71	rec_seq.o \
72	rec_utils.o
73
74OBJECTS= \
75	$(BTREE_OBJS) $(DB_OBJS) $(HASH_OBJS) $(MPOOL_OBJS) $(RECNO_OBJS)
76
77# include library definitions
78include $(SRC)/lib/krb5/Makefile.lib
79
80SRCS=	$(BTREE_OBJS:%.o=../btree/%.c) \
81	$(DB_OBJS:%.o=../db/%.c) \
82	$(HASH_OBJS:%.o=../hash/%.c) \
83	$(MPOOL_OBJS:%.o=../mpool/%.c) \
84	$(RECNO_OBJS:%.o=../recno/%.c)
85
86LIBS=		$(DYNLIB)
87
88include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
89
90POFILE = $(LIBRARY:%.a=%.po)
91POFILES = generic.po
92
93#override liblink
94INS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
95
96CPPFLAGS += 	-DHAVE_CONFIG_H \
97		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/mpool \
98		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/db \
99		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/hash \
100		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/btree \
101		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/recno \
102		-I$(SRC)/lib/krb5/plugins/kdb/db2/libdb2/include \
103		-I$(SRC)/lib/gss_mechs/mech_krb5/include  #for db-ndbm.h
104
105CFLAGS +=	$(CCVERBOSE) -I..
106LDLIBS +=	-lc
107
108# Identify that this library is an interposer (on dbm_ routines from libc.so.1).
109# This identification insures runtime symbol lookup resolves to this library
110# (before libc.so.1) regardless of dependency link order.
111DYNFLAGS +=	$(ZINTERPOSE)
112
113.KEEP_STATE:
114
115all:	$(LIBS)
116
117lint:	lintcheck
118
119# include library targets
120include $(SRC)/lib/krb5/Makefile.targ
121
122pics/%.o: ../btree/%.c
123	$(COMPILE.c)  -o $@ $<
124	$(POST_PROCESS_O)
125
126pics/%.o: ../db/%.c
127	$(COMPILE.c)  -o $@ $<
128	$(POST_PROCESS_O)
129
130pics/%.o: ../hash/%.c
131	$(COMPILE.c)  -o $@ $<
132	$(POST_PROCESS_O)
133
134pics/%.o: ../mpool/%.c
135	$(COMPILE.c)  -o $@ $<
136	$(POST_PROCESS_O)
137
138pics/%.o: ../recno/%.c
139	$(COMPILE.c)  -o $@ $<
140	$(POST_PROCESS_O)
141
142FRC:
143
144generic.po: FRC
145	$(RM) messages.po
146	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../hash/*.[ch]`
147	$(SED) "/^domain/d" messages.po > $@
148	$(RM) messages.po
149