Update.
[glibc.git] / db2 / Makefile
blob77aa60ce6aa0d1d1a18ba877b262f3b0ff714aa8
1 # Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If not,
16 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
20 # Sub-makefile for libdb.
22 # The code is lifted straight from the db 2.7.5 distribution
23 # with minimal changes.
26 subdir = db2
28 subdir-dirs = btree common db db185 dbm hash lock log mp mutex os txn \
29 progs/db_archive progs/db_checkpoint progs/db_deadlock \
30 progs/db_dump progs/db_dump185 progs/db_load progs/db_printlog \
31 progs/db_recover progs/db_stat clib xa
33 headers = db.h db_185.h
35 distribute = db_int.h config.h compat.h clib/getlong.c btree/btree.src \
36 db/db.src db185/db185_int.h hash/hash.src log/log.src \
37 txn/txn.src README LICENSE \
38 $(addprefix include/,btree.h btree_auto.h btree_ext.h \
39 clib_ext.h common_ext.h cxx_int.h \
40 db_185.h.src db_am.h db_auto.h db_cxx.h \
41 db_dispatch.h db_ext.h db_join.h \
42 db_page.h db_shash.h db_swap.h \
43 hash.h hash_auto.h hash_ext.h lock.h \
44 lock_ext.h log.h log_auto.h log_ext.h \
45 mp.h mp_ext.h mutex_ext.h os_ext.h queue.h \
46 shqueue.h txn.h txn_auto.h txn_ext.h \
47 os.h os_jump.h xa.h xa_ext.h) \
48 $(addprefix mutex/,x86.gcc uts4_cc.s sparc.gcc parisc.gcc \
49 README 68020.gcc tsl_parisc.s sco.cc) \
50 $(addprefix progs/db_printlog/,README commit.awk count.awk \
51 pgno.awk range.awk status.awk \
52 txn.awk)
54 vpath %.c $(subdir-dirs)
56 extra-libs := libdb
57 extra-libs-others := $(extra-libs)
58 extra-objs = getlong.o
60 libdb-routines := bt_compare bt_conv bt_curadj bt_cursor bt_delete \
61 bt_open bt_page bt_put bt_rec bt_recno bt_rsearch bt_search \
62 bt_split bt_stat btree_auto db db_appinit db_apprec \
63 db_auto db_iface db_am db_join \
64 db_byteorder db_conv db_dispatch db_dup db_err db_log2 os_alloc \
65 os_abs os_config os_dir os_fid os_fsync os_map os_oflags \
66 os_open os_rpath os_rw os_seek os_sleep os_stat os_unlink \
67 os_spin os_tmpdir db_overflow db_pr db_rec db_region db_ret \
68 db_salloc db_shash hash hash_auto hash_conv \
69 hash_dup hash_func hash_page hash_rec hash_stat lock \
70 lock_conflict lock_deadlock lock_region lock_util log log_archive \
71 log_auto log_compare log_findckp log_get log_put log_rec \
72 log_register mp_bh mp_fget mp_fopen mp_fput mp_fset \
73 mp_open mp_pr mp_region mp_sync mutex txn txn_auto \
74 txn_rec dbm db185 xa xa_db xa_map
76 others := makedb db_dump185 db_archive db_checkpoint db_deadlock \
77 db_dump db_load db_recover db_stat db_printlog
78 install-bin := makedb db_dump185 db_archive db_checkpoint db_deadlock \
79 db_dump db_load db_recover db_stat db_printlog
81 include ../Rules
83 CPPFLAGS += -I./include -include ./compat.h
85 $(objpfx)db_checkpoint: $(objpfx)getlong.o
86 $(objpfx)db_deadlock: $(objpfx)getlong.o
87 $(objpfx)db_load: $(objpfx)getlong.o
89 ifeq ($(build-shared),yes)
90 $(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
91 $(objpfx)db_dump185: $(objpfx)libdb.so$(libdb.so-version)
92 $(objpfx)db_archive: $(objpfx)libdb.so$(libdb.so-version)
93 $(objpfx)db_checkpoint: $(objpfx)libdb.so$(libdb.so-version)
94 $(objpfx)db_deadlock: $(objpfx)libdb.so$(libdb.so-version)
95 $(objpfx)db_dump: $(objpfx)libdb.so$(libdb.so-version)
96 $(objpfx)db_load: $(objpfx)libdb.so$(libdb.so-version)
97 $(objpfx)db_printlog: $(objpfx)libdb.so$(libdb.so-version)
98 $(objpfx)db_recover: $(objpfx)libdb.so$(libdb.so-version)
99 $(objpfx)db_stat: $(objpfx)libdb.so$(libdb.so-version)
100 else
101 $(objpfx)makedb: $(objpfx)libdb.a
102 $(objpfx)db_dump185: $(objpfx)libdb.a
103 $(objpfx)db_archive: $(objpfx)libdb.a
104 $(objpfx)db_checkpoint: $(objpfx)libdb.a
105 $(objpfx)db_deadlock: $(objpfx)libdb.a
106 $(objpfx)db_dump: $(objpfx)libdb.a
107 $(objpfx)db_load: $(objpfx)libdb.a
108 $(objpfx)db_printlog: $(objpfx)libdb.a
109 $(objpfx)db_recover: $(objpfx)libdb.a
110 $(objpfx)db_stat: $(objpfx)libdb.a
111 endif
113 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
114 $(objpfx)libdb.so: $(common-objpfx)libc.so
116 ifeq ($(build-static),yes)
117 subdir_install: $(inst_libdir)/libndbm.a
118 $(inst_libdir)/libndbm.a: $(inst_libdir)/libdb.a $(+force)
119 $(make-link)
120 endif
122 ifeq ($(build-shared),yes)
123 subdir_install: $(inst_libdir)/libndbm.so
124 $(inst_libdir)/libndbm.so: $(inst_libdir)/libdb.so $(+force)
125 $(make-link)
126 endif