xref: /illumos-gate/usr/src/cmd/sendmail/db/Makefile (revision 337314b168c54664c60b2a5071e5b3d509167aef)
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#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/sendmail/db/Makefile
29#
30
31include		../../Makefile.cmd
32include		../Makefile.cmd
33
34srcdir=	.
35
36CPPFLAGS = -I. -I$(srcdir)/include -D_REENTRANT $(CPPFLAGS.sm)
37
38ARFLAGS=cq
39
40OBJS=	bt_compare.o bt_conv.o bt_curadj.o bt_cursor.o bt_delete.o bt_open.o \
41	bt_page.o bt_put.o bt_rec.o bt_recno.o bt_rsearch.o bt_search.o \
42	bt_split.o bt_stat.o btree_auto.o db.o db_appinit.o db_am.o \
43	db_apprec.o db_auto.o db_byteorder.o db_conv.o db_dispatch.o db_dup.o \
44	db_err.o db_iface.o db_join.o db_log2.o db_overflow.o db_pr.o \
45	db_rec.o db_region.o db_ret.o db_salloc.o db_shash.o dbm.o hash.o \
46	hash_auto.o hash_conv.o hash_dup.o hash_func.o hash_page.o hash_rec.o \
47	hash_stat.o hsearch.o lock.o lock_conflict.o lock_deadlock.o \
48	lock_util.o lock_region.o log.o log_archive.o log_auto.o \
49	log_compare.o log_findckp.o log_get.o log_put.o log_rec.o \
50	log_register.o mp_bh.o mp_fget.o mp_fopen.o mp_fput.o mp_fset.o \
51	mp_open.o mp_pr.o mp_region.o mp_sync.o mutex.o os_abs.o os_alloc.o \
52	os_config.o os_dir.o os_fid.o os_fsync.o os_map.o os_oflags.o \
53	os_open.o os_rpath.o os_rw.o os_seek.o os_sleep.o os_spin.o os_stat.o \
54	os_tmpdir.o os_unlink.o txn.o txn_auto.o txn_rec.o xa.o xa_db.o \
55	xa_map.o strsep.o
56
57SRCS=	$(OBJS:%.o=$(srcdir)/*/%.c)
58
59libdb=	libdb.a
60
61.KEEP_STATE:
62all: $(libdb)
63
64.PARALLEL:	$(OBJS)
65
66$(libdb): db.h $(OBJS)
67	$(RM) $@
68	$(AR) $(ARFLAGS) $@ $(OBJS)
69
70clean:
71	$(RM) $(OBJS) $(libdb)
72
73depend obj:
74
75install: all
76
77lint:
78	$(LINT.c) $(SRCS) $(LDLIBS)
79
80# DB files.
81db%.o: $(srcdir)/db/db%.c
82	$(COMPILE.c) $<
83	$(POST_PROCESS_O)
84
85# Btree source files.
86bt%.o: $(srcdir)/btree/bt%.c
87	$(COMPILE.c) $<
88	$(POST_PROCESS_O)
89
90# Hash source files.
91hash%.o: $(srcdir)/hash/hash%.c
92	$(COMPILE.c) $<
93	$(POST_PROCESS_O)
94
95# Lock source files.
96lock%.o: $(srcdir)/lock/lock%.c
97	$(COMPILE.c) $<
98	$(POST_PROCESS_O)
99
100# Log source files.
101log%.o: $(srcdir)/log/log%.c
102	$(COMPILE.c) $<
103	$(POST_PROCESS_O)
104
105# Mpool source files.
106mp_%.o: $(srcdir)/mp/mp_%.c
107	$(COMPILE.c) $<
108	$(POST_PROCESS_O)
109
110# Mutex source files.
111mutex%.o: $(srcdir)/mutex/mutex%.c
112	$(COMPILE.c) $<
113	$(POST_PROCESS_O)
114
115# Transaction source files.
116txn%.o: $(srcdir)/txn/txn%.c
117	$(COMPILE.c) $<
118	$(POST_PROCESS_O)
119
120# Transaction manager source files.
121xa%.o: $(srcdir)/xa/xa%.c
122	$(COMPILE.c) $<
123	$(POST_PROCESS_O)
124
125# Historic interfaces.
126hsearch%.o: $(srcdir)/hsearch/hsearch%.c
127	$(COMPILE.c) $<
128	$(POST_PROCESS_O)
129dbm%.o: $(srcdir)/dbm/dbm%.c
130	$(COMPILE.c) $<
131	$(POST_PROCESS_O)
132
133# OS specific source files.
134os_%.o: $(srcdir)/os/os_%.c
135	$(COMPILE.c) $<
136	$(POST_PROCESS_O)
137
138# Replacement source files.
139strsep%.o: $(srcdir)/clib/strsep%.c
140	$(COMPILE.c) $<
141	$(POST_PROCESS_O)
142
143include		../../Makefile.targ
144