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 2017 Gary Mills
  24 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  25 # Use is subject to license terms.
  26 #
  27 # cmd/sendmail/db/Makefile
  28 #
  29 
  30 include         ../../Makefile.cmd
  31 include         ../Makefile.cmd
  32 
  33 srcdir= .
  34 
  35 CPPFLAGS = -I. -I$(srcdir)/include -D_REENTRANT $(CPPFLAGS.sm)
  36 
  37 ARFLAGS=cq
  38 
  39 OBJS=   bt_compare.o bt_conv.o bt_curadj.o bt_cursor.o bt_delete.o bt_open.o \
  40         bt_page.o bt_put.o bt_rec.o bt_recno.o bt_rsearch.o bt_search.o \
  41         bt_split.o bt_stat.o btree_auto.o db.o db_appinit.o db_am.o \
  42         db_apprec.o db_auto.o db_byteorder.o db_conv.o db_dispatch.o db_dup.o \
  43         db_err.o db_iface.o db_join.o db_log2.o db_overflow.o db_pr.o \
  44         db_rec.o db_region.o db_ret.o db_salloc.o db_shash.o dbm.o hash.o \
  45         hash_auto.o hash_conv.o hash_dup.o hash_func.o hash_page.o hash_rec.o \
  46         hash_stat.o hsearch.o lock.o lock_conflict.o lock_deadlock.o \
  47         lock_util.o lock_region.o log.o log_archive.o log_auto.o \
  48         log_compare.o log_findckp.o log_get.o log_put.o log_rec.o \
  49         log_register.o mp_bh.o mp_fget.o mp_fopen.o mp_fput.o mp_fset.o \
  50         mp_open.o mp_pr.o mp_region.o mp_sync.o mutex.o os_abs.o os_alloc.o \
  51         os_config.o os_dir.o os_fid.o os_fsync.o os_map.o os_oflags.o \
  52         os_open.o os_rpath.o os_rw.o os_seek.o os_sleep.o os_spin.o os_stat.o \
  53         os_tmpdir.o os_unlink.o txn.o txn_auto.o txn_rec.o xa.o xa_db.o \
  54         xa_map.o strsep.o
  55 
  56 SRCS=   $(OBJS:%.o=$(srcdir)/*/%.c)
  57 
  58 libdb=  libdb.a
  59 
  60 # Suppress errors for: flags info notused1 notused2 notused3
  61 bt_cursor.o \
  62     bt_rec.o \
  63     btree_auto.o := \
  64     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
  65 # Suppress errors for: isdeleted dbp t ch i
  66 bt_recno.o \
  67     bt_stat.o \
  68     btree_auto.o := \
  69     CERRWARN += -_gcc=-Wno-unused-but-set-variable
  70 # Suppress errors for: notused1 notused2 notused3 pg dbenv info logp redo
  71 #     key data flags
  72 db_auto.o \
  73     db_conv.o \
  74     db_join.o \
  75     db_dispatch.o \
  76     db_rec.o := \
  77     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
  78 # Suppress errors for: ret ch i save_indx grow_region
  79 db_am.o \
  80     db_auto.o \
  81     db_dup.o \
  82     db_join.o \
  83     db_region.o := \
  84     CERRWARN += -_gcc=-Wno-unused-but-set-variable
  85 # Suppress errors for: key
  86 dbm.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
  87 # Suppress errors for: dbp notused1 notused2 notused3 info spp db_malloc flags
  88 hash.o \
  89     hash_auto.o \
  90     hash_rec.o \
  91     hash_stat.o := \
  92     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
  93 # Suppress errors for: ch i mpf
  94 hash_auto.o \
  95     hash_rec.o := \
  96     CERRWARN += -_gcc=-Wno-unused-but-set-variable
  97 # Suppress error for: flags
  98 lock.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
  99 # Suppress errors for: notused1 notused2 notused3 lsnp info
 100 log_auto.o \
 101     log_rec.o := \
 102     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 103 # Suppress errors for: off fd
 104 mutex.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 105 # Suppress error for: path
 106 os_map.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 107 # Suppress errors for: notused1 notused2 notused3 logp redo
 108 txn_auto.o \
 109     txn_rec.o := \
 110     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 111 # Suppress error for: locker ch i
 112 txn.o \
 113     txn_auto.o := \
 114     CERRWARN += -_gcc=-Wno-unused-but-set-variable
 115 # Suppress errors for: xa_info handle retval rmid flags fdp
 116 xa.o \
 117     xa_db.o := \
 118     CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 119 # Suppress error for: xid
 120 xa_map.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
 121 
 122 .KEEP_STATE:
 123 all: $(libdb)
 124 
 125 .PARALLEL:      $(OBJS)
 126 
 127 $(libdb): db.h $(OBJS)
 128         $(RM) $@
 129         $(AR) $(ARFLAGS) $@ $(OBJS)
 130 
 131 clean:
 132         $(RM) $(OBJS) $(libdb)
 133 
 134 depend obj:
 135 
 136 install: all
 137         
 138 lint:
 139         $(LINT.c) $(SRCS) $(LDLIBS)
 140 
 141 # DB files.
 142 db%.o: $(srcdir)/db/db%.c
 143         $(COMPILE.c) $<
 144         $(POST_PROCESS_O)
 145 
 146 # Btree source files.
 147 bt%.o: $(srcdir)/btree/bt%.c
 148         $(COMPILE.c) $<
 149         $(POST_PROCESS_O)
 150 
 151 # Hash source files.
 152 hash%.o: $(srcdir)/hash/hash%.c
 153         $(COMPILE.c) $<
 154         $(POST_PROCESS_O)
 155 
 156 # Lock source files.
 157 lock%.o: $(srcdir)/lock/lock%.c
 158         $(COMPILE.c) $<
 159         $(POST_PROCESS_O)
 160 
 161 # Log source files.
 162 log%.o: $(srcdir)/log/log%.c
 163         $(COMPILE.c) $<
 164         $(POST_PROCESS_O)
 165 
 166 # Mpool source files.
 167 mp_%.o: $(srcdir)/mp/mp_%.c
 168         $(COMPILE.c) $<
 169         $(POST_PROCESS_O)
 170 
 171 # Mutex source files.
 172 mutex%.o: $(srcdir)/mutex/mutex%.c
 173         $(COMPILE.c) $<
 174         $(POST_PROCESS_O)
 175 
 176 # Transaction source files.
 177 txn%.o: $(srcdir)/txn/txn%.c
 178         $(COMPILE.c) $<
 179         $(POST_PROCESS_O)
 180 
 181 # Transaction manager source files.
 182 xa%.o: $(srcdir)/xa/xa%.c
 183         $(COMPILE.c) $<
 184         $(POST_PROCESS_O)
 185 
 186 # Historic interfaces.
 187 hsearch%.o: $(srcdir)/hsearch/hsearch%.c
 188         $(COMPILE.c) $<
 189         $(POST_PROCESS_O)
 190 dbm%.o: $(srcdir)/dbm/dbm%.c
 191         $(COMPILE.c) $<
 192         $(POST_PROCESS_O)
 193 
 194 # OS specific source files.
 195 os_%.o: $(srcdir)/os/os_%.c
 196         $(COMPILE.c) $<
 197         $(POST_PROCESS_O)
 198 
 199 # Replacement source files.
 200 strsep%.o: $(srcdir)/clib/strsep%.c
 201         $(COMPILE.c) $<
 202         $(POST_PROCESS_O)
 203 
 204 include         ../../Makefile.targ