root/juggler/tags/1.0.7/mk/vj.dep.mk

Revision 12498, 4.3 kB (checked in by anonymous, 6 years ago)

This commit was manufactured by cvs2svn to create tag
'RELENG_1_0_7_RELEASE'.

  • 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, 1999, 2000 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 # -----------------------------------------------------------------
26 # File:          $RCSfile$
27 # Date modified: $Date$
28 # Version:       $Revision$
29 # -----------------------------------------------------------------
30 #
31 # *************** <auto-copyright.pl END do not edit this line> ***************
32
33 # -----------------------------------------------------------------------------
34 # This include file <vj.dep.mk> handles source code dependencies.  It
35 # generates makefiles corresponding to each source file (ending in .c or .cpp)
36 # that have the dependencies for that source file.  The generated file can
37 # then be included in the Makefile for the directory.
38 # -----------------------------------------------------------------------------
39 # The Makefile including this file must define the following variables:
40 #
41 # MKEPS_C_COMPILE   - The compiler command for C files.
42 # MKEPS_CXX_COMPILE - The compiler command for C++ files.
43 # DEP_GEN_FLAG      - The flag passed to the compiler to generate dependencies.
44 # DEPEND_FILES      - The list of dependency makefiles to be generated.
45 # OBJDIR            - The directory to which the object file(s) will be
46 #                     written.
47 # OBJ_FILE_SUFFIX   - Suffix for object file names (e.g., "o" or "obj").
48 #
49 # Example:
50 #         srcdir = /usr/src/proj1
51 #         OBJDIR = /usr/obj/proj1
52 #   DEP_GEN_FLAG = -M
53 #   DEPEND_FILES = file1.d file2.d file3.d
54 #
55 # With these settings, the source code comes from /usr/src/proj1 and the
56 # object files go into /usr/obj/proj1.
57 # -----------------------------------------------------------------------------
58
59 # Conditionally set ${OBJDIR} just to be safe.
60 ifndef OBJDIR
61     OBJDIR      = .
62 endif
63
64 ifdef DO_CLEANDEPEND
65     CLEAN_FILES += ${DEPEND_FILES}
66 endif
67
68 # These expressions reformat the output from the dependency text to be of the
69 # form:
70 #
71 #     ${OBJDIR}/file1.o file1.d : ...
72 #
73 # where file1 is the value in $* and file1.d is $@.  The first handles output
74 # from the C and C++ compilers which prints only the object file to be
75 # created ($*).  The second handles output from makedepend(1) which includes
76 # the path leading to the source file in the object file name.
77 _CC_SED_EXP     = '\''s/\($*\)\.${OBJ_FILE_SUFFIX}[ :]*/$${OBJDIR}\/\1.${OBJ_FILE_SUFFIX} $@: /g'\''
78 _MKDEP_SED_EXP  = '\''s/.*\($*\)\.${OBJ_FILE_SUFFIX}[ :]*/$${OBJDIR}\/\1.${OBJ_FILE_SUFFIX} $@: /g'\''
79
80 %.d: %.c
81         @echo "Updating dependency file $@ ..."
82 ifeq (${PLATFORM}, HP)
83         @${SHELL} -ec 'makedepend -f- -o.${OBJ_FILE_SUFFIX}             \
84                        ${DEPENDFLAGS} -- ${DEPEND_EXTRAS} -- $< |       \
85                        sed ${_MKDEP_SED_EXP} > $@ ; [ -s $@ ] || rm -f $@'
86 else
87   ifeq (${CC}, cl)
88         @${SHELL} -ec 'makedepend -f- -o.${OBJ_FILE_SUFFIX}             \
89                        ${DEPENDFLAGS} -- ${DEPEND_EXTRAS} -- $< |       \
90                        sed ${_MKDEP_SED_EXP} > $@ ; [ -s $@ ] || rm -f $@'
91   else
92         @${SHELL} -ec '${MKDEPS_C_COMPILE} ${DEP_GEN_FLAG} $< |         \
93                        sed ${_CC_SED_EXP} > $@ ; [ -s $@ ] || rm -f $@'
94   endif
95 endif
96
97 %.d: %.cpp
98         @echo "Updating dependency file $@ ..."
99 ifeq (${CC}, cl)
100         @${SHELL} -ec 'makedepend -f- -o.${OBJ_FILE_SUFFIX}             \
101                        ${DEPENDFLAGS} -- ${DEPEND_EXTRAS} -- $< |       \
102                        sed ${_MKDEP_SED_EXP} > $@ ; [ -s $@ ] || rm -f $@'
103 else
104         @${SHELL} -ec '${MKDEPS_CXX_COMPILE} ${DEP_GEN_FLAG} $< |               \
105                        sed ${_CC_SED_EXP} > $@ ; [ -s $@ ] || rm -f $@'
106 endif
Note: See TracBrowser for help on using the browser.