root/juggler/tags/1.0_beta_1/Makefile.base.in

Revision 816, 9.0 kB (checked in by patrick, 10 years ago)

Invoke ${PERL} on the Perl scripts rather than relying on them to have
their execute bits set and have a working she-bang line.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # -----------------------------------------------------------------------------
2 # $Id$
3 #
4 # This file <Makefile.base> provides variable information and targets shared
5 # by all Makefiles in the VR Juggler source tree.  It requires GNU make.
6 # -----------------------------------------------------------------------------
7 # All Makefiles in the source tree should include this file for maximum
8 # information sharing.
9 #
10 # ** NOTE:                                                                  **
11 # **   Shared targets are defined here, so any files that include this file **
12 # **   should define a default target BEFORE including this file.           **
13 # -----------------------------------------------------------------------------
14 # Variables defined here are:
15 #
16 # SHELL          - The shell to use when make(1) executes shell commands.
17 #
18 # bindir         - Path to bin directory containing executables (usually
19 #                  ${exec_prefix}/bin).
20 # datadir        - Path to a directory generally sharing platform-independent
21 #                  data (usually ${prefix}/share).
22 # exec_prefix    - Path to base directory where executables will be (usually
23 #                  ${prefix}).
24 # libdir         - Path to directory containing shared and static libraries
25 #                  (usually ${exec_prefix}/lib).
26 # libexecdir     - Path to libexec directory that generally contains
27 #                  executables not called directly by users (usually
28 #                  ${exec_prefix}/libexec).
29 # mtreedir       - Base directory containing the mtree directory hierarchy
30 #                  specifications.
31 # mtreedir_os    - Subdirectory of ${mtreedir} containing platform-specific
32 #                  directory hierarchy specification files.
33 # prefix         - Base path used for installation and other things.
34 # releasedir     - The absolute path to the release directory.
35 # sbindir        - Path to sbin directory containing executables (usually
36 #                  ${exec_prefix}/sbin).
37 # scriptdir      - The path to the directory containing scripts used in the
38 #                  build and install/release process.
39 # sysconfdir     - System configuration directory (usually ${prefix}/etc).
40 # topdir         - The top of the build tree.
41 # VJROOT_ABS     - The absolute path to the root of the VR Juggler source
42 #                  tree.
43 #
44 # AR             - Path to ar(1) (or equivalent program).
45 # ARFLAGS        - Flags for ${AR}.
46 # CC             - Path to C compiler.
47 # CXX            - Path to C++ compiler.
48 # CPP            - Command for invoking the C preprocessor.
49 # CXXCPP         - Command for invoking the C preprocessor used by the C++
50 #                  compiler.
51 # CFLAGS         - Flags for ${CC}.
52 # CPPFLAGS       - Flags for ${CPP} and ${CXXCPP}.
53 # CXXFLAGS       - Flags for ${CXX}.
54 # DEFS           - Command-line preprocessor definitions (-Dvariable=value).
55 # DEPENDFLAGS    - Flags passed to makedepend(1) (or equivalent program for
56 #                  generating dependencies).
57 # DEPEND_EXTRAS  - Flags not recognized by makedepend(1) that may be necessary
58 #                  in ${CFLAGS} or ${CXXFLAGS}.
59 # INCLUDES       - Additions to the include path (-I/path/to/include).
60 # LD             - Path to ld(1) (or equivalent program).
61 # LDFLAGS        - Flags for ${LD}.
62 # LDOPTS         - Extra, often platform-specific, options for the linker.
63 # LIBS           - Extra external libraries needed at link time.
64 # MKPATH         - Path to shared vj.*.mk file directory.
65 # MTREE_CMD      - Path to a BSD-compatible mtree.
66 # OBJDIR         - Path to the directory where the object files will be built.
67 # PERL           - Path to Perl 5 binary.
68 #
69 # C_COMPILE      - Command for compiling C code.
70 # CXX_COMPILE    - Command for compiling C++ code.
71 #
72 # ABI            - Application Binary Interface type (on IRIX).  This may be
73 #                  used for other binary types when supported by the operating
74 #                  system (e.g., "ELF" or "AOUT").
75 # LIBBITSUF      - Suffix for the library path used by the linker on IRIX
76 #                  only.  For o32 binaries, it will be blank.  For n32
77 #                  binaries, it will be 32.  For 64-bit binaries, it will be
78 #                  64.
79 # PLATFORM       - The operating system abbreviation on which the library is
80 #                  being built (e.g., SGI -> IRIX on an SGI computer,
81 #                  HP => HP-UX on an HP workstation).
82 #
83 # VJ_LIBRARY     - The base name of the core Juggler library that will be
84 #                  built with no file extension.
85 # GL_LIBRARY     - The base name of the OpenGL Juggler API library with no
86 #                  file extension.
87 # PF_LIBRARY     - The base name of the Performer Juggler API library with no
88 #                  file extension.
89 # -----------------------------------------------------------------------------
90 # Targets defined here are:
91 #
92 # Suffix rules for .c => .o and .cpp => .o.
93 # clean: Standard directory clean-up target.
94 # -----------------------------------------------------------------------------
95
96 SHELL           = /bin/sh
97
98 # -----------------------------------------------------------------------------
99 # Base variables needed by all Makefiles.
100 # -----------------------------------------------------------------------------
101 bindir          = @bindir@
102 datadir         = @datadir@
103 exec_prefix     = @exec_prefix@
104 libdir          = @libdir@
105 libexecdir      = @libexecdir@
106 mtreedir        = ${releasedir}/mtree
107 mtreedir_os     = ${mtreedir}/${PLATFORM}
108 prefix          = @prefix@
109 releasedir      = ${VJROOT_ABS}/release
110 sbindir         = @sbindir@
111 scriptdir       = ${releasedir}/scripts
112 sysconfdir      = @sysconfdir@
113 topdir          = @topdir@
114 VJROOT_ABS      = @VJROOT_ABS@
115
116 AR              = @AR@ ${EXTRA_ARFLAGS} ${ARFLAGS}
117 ARFLAGS         = @ARFLAGS@
118 CC              = @CC@
119 CXX             = @CXX@
120 CPP             = @CPP@
121 CXXCPP          = @CXXCPP@
122 CFLAGS          = @CFLAGS@ ${OPTIMIZER}
123 CPPFLAGS        = @CPPFLAGS@
124 CXXFLAGS        = @CXXFLAGS@ ${OPTIMIZER}
125 DEFS            = @DEFS@
126 DEPENDFLAGS     = @DEPENDFLAGS@ @INCLUDES@ -I${VJROOT_ABS} -I${topdir}
127 DEPEND_EXTRAS   = @DEPEND_EXTRAS@ ${DEFS}
128 INCLUDES        = @INCLUDES@ -I${VJROOT} -I${topdir}
129 INSTALL         = @INSTALL@
130 LD              = @LD@ ${EXTRA_LDFLAGS}
131 LDFLAGS         = @LDFLAGS@ -L/usr/lib${LIBBITSUF} -L/usr/lib
132 LDOPTS          = @LDOPTS@
133 LIBS            = @LIBS@
134 MAKEFLAGS       += --no-print-directory
135 MKPATH          = ${VJROOT_ABS}/mk
136 MTREE_CMD       = @MTREE_CMD@
137 PERL            = @PERL@
138
139 # Allow overriding the default value of ${OBJDIR} by setting ${BASE_OBJDIR}
140 # (probably using an externally defined value).
141 ifdef BASE_OBJDIR
142     OBJDIR      := ${BASE_OBJDIR}
143 else
144     OBJDIR      = .
145 endif
146
147 # -----------------------------------------------------------------------------
148 # Compiler command lines.
149 # -----------------------------------------------------------------------------
150 C_COMPILE       = ${CC} ${DEFS} ${INCLUDES} ${CPPFLAGS} ${CFLAGS}
151 CXX_COMPILE     = ${CXX} ${DEFS} ${INCLUDES} ${CPPFLAGS} ${CXXFLAGS}
152
153 # -----------------------------------------------------------------------------
154 # Platform- and binary-specific options.  The assignments preceding the
155 # ifeq ... endif blocks are the default values.  Depending on the value of
156 # ${ABI}, further settings may be made to allow for building with multiple
157 # ABIs.
158 # -----------------------------------------------------------------------------
159 ifdef vjABI
160     ifeq (${vjABI}, O32)
161         ABI             = O32
162         ISA             = mips2
163     endif
164     ifeq (${vjABI}, N32_M3)
165         ABI             = N32
166         ISA             = mips3
167     endif
168     ifeq (${vjABI}, N32_M4)
169         ABI             = N32
170         ISA             = mips4
171     endif
172     ifeq (${vjABI}, 64_M3)
173         ABI             = 64
174         ISA             = mips3
175     endif
176     ifeq (${vjABI}, 64_M4)
177         ABI             = 64
178         ISA             = mips4
179     endif
180     ifeq (${vjABI}, AOUT_i386)
181         ABI             = AOUT
182         ISA             = i386
183     endif
184     ifeq (${vjABI}, ELF_i386)
185         ABI             = ELF
186         ISA             = i386
187     endif
188 else
189     ABI         = @ABI@
190     ISA         = @ISA@
191     LIBBITSUF   = @LIBBITSUF@
192 endif
193
194 PLATFORM        = @PLATFORM@
195
196 ifeq (${ABI}, O32)
197     ARFLAGS     := -o32 -mips2 ${ARFLAGS}
198     CFLAGS      += -o32 -mips2
199     CXXFLAGS    += -o32 -mips2
200     LDOPTS      += -o32 -mips2
201     LIBBITSUF   =
202 endif
203 ifeq (${ABI}, N32)
204     ARFLAGS     := -n32 ${ARFLAGS}
205     CFLAGS      += -n32
206     CXXFLAGS    += -n32
207     LDOPTS      += -n32
208     LIBBITSUF   = 32
209 endif
210 ifeq (${ABI}, 64)
211     ARFLAGS     := -64 ${ARFLAGS}
212     CFLAGS      += -64
213     CXXFLAGS    += -64
214     LDOPTS      += -64
215     LIBBITSUF   = 64
216 endif
217 ifeq (${ABI}, AOUT)
218     CFLAGS      += -aout
219     CXXFLAGS    += -aout
220     LDOPTS      += -aout
221     LIBBITSUF   =
222 endif
223 ifeq (${ABI}, ELF)
224     CFLAGS      += -elf
225     CXXFLAGS    += -elf
226     LDOPTS      += -elf
227     LIBBITSUF   =
228 endif
229
230 ifeq (${ISA}, mips3)
231     ARFLAGS     := -mips3 ${ARFLAGS}
232     CFLAGS      += -mips3
233     CXXFLAGS    += -mips3
234     LDOPTS      += -mips3
235 endif
236 ifeq (${ISA}, mips4)
237     ARFLAGS     := -mips4 ${ARFLAGS}
238     CFLAGS      += -mips4
239     CXXFLAGS    += -mips4
240     LDOPTS      += -mips4
241 endif
242
243 # -----------------------------------------------------------------------------
244 # Library names.
245 # -----------------------------------------------------------------------------
246 VJ_LIBRARY      = libJuggler
247 GL_LIBRARY      = libJuggler_ogl
248 PF_LIBRARY      = libJuggler_pf
249
250 @SET_MAKE@
251
252 # -----------------------------------------------------------------------------
253 # Include a common 'clean' target.
254 # -----------------------------------------------------------------------------
255 include ${MKPATH}/vj.clean.mk
Note: See TracBrowser for help on using the browser.