1#################################
2# $Id: Makefile.both.in 440956 2014-07-18 14:50:18Z ucko $
3# Author:  Aaron Ucko (ucko@ncbi.nlm.nih.gov)
4#################################
5# This can be used to build/install/clean BOTH
6#
7# a single(sic!) library [LIB] made of object files [SRC] and [OBJ]
8# where [SRC].o will be automagically compiled from [SRC].cpp or
9# [SRC].c, and [OBJ].o must be already compiled by this time.
10#
11# AND
12#
13# a single shared(DLL) library [LIB] made of object files [SRC] and [OBJ]
14# where [SRC].o will be automagically compiled from [SRC].cpp or
15# [SRC].c, and [OBJ].o must be already compiled by this time.
16# The following libs will be used to resolve external references:
17#   [DLL_LIB] or [DLL_DLIB] -- libs located in the NCBI C++ "lib/" dir;
18#   [LIBS]                  -- 3rd-party libs
19#
20# The library will be linked against DLL_DLIB in --with-dll configurations
21# (and --with-gbench configurations) and DLL_LIB otherwise.
22#
23################
24## Example of usage:
25#
26# srcdir = @srcdir@
27# include @builddir@/Makefile.mk
28#
29# LIB = p1
30# SRC = p1_src1 p1_src2
31# OBJ = p1_myobj
32#
33# DLL_LIB  = xncbi
34# LIBS = $(NETWORK_LIBS)
35# .....
36# CXXFLAGS = -g $(ORIG_CXXFLAGS) -D_DEBUG -DXYZ_P1_PROJECT
37# .....
38# include @builddir@/Makefile.both
39#################################
40
41# Copied from Makefile.dll.in, so that it can take effect in time for
42# Makefile.lib's inclusion of Makefile.$(Rules).
43XDLL_LIBS = @DLL_LIB_SETTING@
44include $(builddir)/Makefile.lib
45@IF_WITH_DLL@ XLIBDEP = $(XLIBDEPLINK)
46@IF_WITH_DLL@ XOLD_DLLS =
47
48include $(builddir)/Makefile.dll
49@UNLESS_WITH_DLL@ XDLL_LINK          = $(XDLL)
50@UNLESS_WITH_DLL@ XDLL_LOADABLE_LINK = $(XDLL_LOADABLE)
51@UNLESS_WITH_DLL@ XDLLDEP_LINK       = $(XDLLDEP)
52