root/juggler/branches/2.2/modules/gadgeteer/drivers/gadget.driver.mk.in

Revision 20500, 5.2 kB (checked in by patrick, 1 year ago)

Merges from the trunk:

r20490: Instead of using a different name to distinguish between

debug-enabled and optimized DLLS linked against the release runtime
on Windows, use directories in much the same way that we always
have on non-Windows platforms. This allows users to switch between
optimized and debug-enabled code at run time simply by changing the
PATH environment variable. No relinking or recompiling is required.
This is something that we have always been able to do on
non-Windows platofrms, and we can finally do it on Windows, too.

r20491: When we are running a debug build (not linking against the debug

runtime on Windows), prepend the "debug" subdirectory to the
plug-in search path by default.

r20492: Get the non-Windows build and installation in sync with the Windows

build with regard to debug-enabled plug-ins. Instead of using an
"_d" name variant, we are now separating the plug-ins using
directories. The debug-enabled plug-ins go in the "debug"
subdirectory of the directory containing the optimized plug-ins. In
cases where the plug-in search path is configurable, users can load
the debug plug-ins into optimized or debug-enabled code by changing
the search path in the configuration. Now, the "debug" subdirectory
is searched before the optimized directory for debug builds. This
retains backwards compatibility with previous versions and keeps
things simple when developers are only making debug builds.

JCCL, Gadgeteer, Sonix, and VR Juggler load plug-ins using vpr::LibraryLoader?.
While there has been no API change to that class that these modules depend on,
they do need to get the proper run-time behavior when searching for plug-ins.
As such, they now all need VPR 1.1.49 (i.e., this revision) or newer.

All of this is noted in the respective ChangeLog? files, and the version
number of each Juggler module to mark this significant change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
2 #
3 # VR Juggler is (C) Copyright 1998-2007 by Iowa State University
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Christopher Just,
7 #   Patrick Hartling, Kevin Meinert,
8 #   Carolina Cruz-Neira, Albert Baker
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Library General Public License for more details.
19 #
20 # You should have received a copy of the GNU Library General Public
21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24 #
25 # *************** <auto-copyright.pl END do not edit this line> ***************
26
27 # =============================================================================
28 # This file <gadget.driver.mk> provides variable assignments based on the
29 # results of running an Autoconf-based configure script.  It is installed with
30 # the Gadgeteer data files so that users can include it in their driver plug-in
31 # makefiles.  All the variables and targets needed to compile and link driver
32 # plug-ins are defined here.  Users only need to name their driver
33 #
34 # Required variables:
35 # DRIVER_NAME - The base name of the driver (e.g., MotionStar)
36 # SRCS        - The list of all C/C++source files that must be compiled.  This
37 #               can mix C and C++ sources with different file extensions.
38 #
39 # Generated for use on @PLATFORM@
40 # =============================================================================
41
42 # $Id$
43
44 default: driver-dso
45
46 GADGET_BASE_DIR?=       @prefix@
47 DZR_BASE_DIR?=          $(shell flagpoll doozer --get-prefix)
48
49 # -----------------------------------------------------------------------------
50 # Base variables for compiling and linking.
51 # -----------------------------------------------------------------------------
52 CC=                     @CC@
53 CXX=                    @CXX@
54 CFLAGS_DYNLIB=          @CFLAGS_DYNLIB@
55 CC_PROF_FLAGS=          @CC_PROF_FLAGS@
56 CXXFLAGS_DYNLIB=        @CXXFLAGS_DYNLIB@
57 CXX_PROF_FLAGS=         @CXX_PROF_FLAGS@
58 C_DLL=                  @C_DLL@ $(DPP_EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
59 CXX_DLL=                @CXX_DLL@ $(DPP_EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
60 C_PLUGIN=               @C_PLUGIN@ $(DPP_EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
61 CXX_PLUGIN=             @CXX_PLUGIN@ $(DPP_EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
62 DEP_GEN_FLAG=           @DEP_GEN_FLAG@
63 DYLIB_NAME_FLAG=        @DYLIB_NAME_FLAG@
64 JDK_HOME=               @JDK_HOME@
65 LD=                     @LD@ $(DPP_EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
66 LDOPTS=                 @LDOPTS@ $(DPP_EXTRA_LDOPTS) $(EXTRA_LDOPTS)    \
67                         $(DSOVERSIONOPTS)
68 LDOPTS_DBG=             @LDOPTS_DBG@ $(EXTRA_LDOPTS_DBG)
69 LDOPTS_OPT=             @LDOPTS_OPT@ $(EXTRA_LDOPTS_OPT)
70 LDOPTS_PROF=            @LDOPTS_PROF@ $(EXTRA_LDOPTS_PROF)
71 OBJDIR?=                .
72 PROFLIB_EXT=            _p
73 PROF_OPT_FLAGS=         $(DBG_FLAGS)
74
75 # -----------------------------------------------------------------------------
76 # Plug-in related settings.
77 # -----------------------------------------------------------------------------
78 DYNAMICLIB_EXT=         @DYNAMICLIB_EXT@
79 OBJEXT=                 @OBJEXT@
80 OBJ_BUILD_FLAG=         @OBJ_BUILD_FLAG@
81 OBJ_NAME_FLAG=          @OBJ_NAME_FLAG@
82 OS_TYPE=                @OS_TYPE@
83
84 # SGI-specific dynamic-shared-object information.
85 DSOREGFILE=             @DSOREGFILE@
86 DSOVERSION=             @DSOVERSION@
87 DSOVERSIONOPTS=         @DSOVERSIONOPTS@
88
89 # -----------------------------------------------------------------------------
90 # Extensions to the base Doozer compiler and linker flags that are required
91 # for building Gadgeteer device driver plug-ins.
92 # -----------------------------------------------------------------------------
93 EXTRA_CFLAGS+=          @CFLAGS@ $(OPTIMIZER) $(CFLAGS_DYNLIB) $(EXTRA_DEFS)
94 EXTRA_CXXFLAGS+=        @CXXFLAGS@ $(OPTIMIZER) $(CXXFLAGS_DYNLIB) $(EXTRA_DEFS)
95 EXTRA_DEFS=             @DEFS@ -D_GADGET_DRIVER_BUILD_
96 EXTRA_DEPENDFLAGS+=     @DEPEND_FLAGS@ $(EXTRA_INCLUDES)
97 EXTRA_INCLUDES+=        @INCLUDES@ $(shell flagpoll gadgeteer --cflags-only-I)
98 EXTRA_LDFLAGS+=         @LDFLAGS@ @EXTRA_LDFLAGS@
99 EXTRA_LIBS+=            @LIBS@
100
101 # -----------------------------------------------------------------------------
102 # Helper utilities.
103 # -----------------------------------------------------------------------------
104 LN_S=                   @LN_S@
105 MAKEDEPEND=             @MAKEDEPEND@
106 PERL=                   @PERL@
107 RANLIB=                 @RANLIB@
108 RM_LN=                  @RM_LN@
109
110 # -----------------------------------------------------------------------------
111 # Common code for driver DSOs.
112 # -----------------------------------------------------------------------------
113 ifeq ($(BUILD_TYPE), dbg)
114    BUILD_TYPE_EXT=     
115    DEBUG_APP=           TRUE
116    OPTIM_APP=           FALSE
117    EXTRA_DEFS+=         -DJUGGLER_DEBUG
118 else
119    BUILD_TYPE_EXT=     
120    DEBUG_APP=           FALSE
121    OPTIM_APP=           TRUE
122    EXTRA_DEFS+=         -DJUGGLER_OPT -DNDEBUG
123 endif
124
125 DSO_DRIVER_DEPS=        $(shell flagpoll gadgeteer --libs)
126
127 DRIVER_DSO=     $(DRIVER_NAME)_drv$(BUILD_TYPE_EXT).$(DYNAMICLIB_EXT)
128 DYLIB_DEPS=     $(PRE_DSO_DRIVER_DEPS) $(DSO_DRIVER_DEPS)               \
129                 $(POST_DSO_DRIVER_DEPS)
130
131 # It is critical that this be included before the $(DRIVER_DSO) target below.
132 include $(DZR_BASE_DIR)/mk/dzr.lib.mk
133 driver-dso: $(DRIVER_DSO)
134
135 $(DRIVER_DSO): $(OBJS)
136         $(CXX_PLUGIN) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJS) $(DYLIB_DEPS)
137
138 CLOBBER_FILES+= $(DRIVER_DSO)
Note: See TracBrowser for help on using the browser.