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