-
Notifications
You must be signed in to change notification settings - Fork 49
/
Glut.cf
197 lines (169 loc) · 8.33 KB
/
Glut.cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
XCOMM Copyright (c) Mark J. Kilgard, 1994, 1997, 1998, 2005.
XCOMM Glut.cf - GLUT distribution Imakefile configuration info
/* MESA USERS: Remove the "/* " characters in the two #define
lines below this comment and change the "#define MesaDir" line
to match the top-level directory of your Mesa source tree.
If you have installed Mesa's libraries and headers correctly
(say with the Mesa RPMs), you can build GLUT using your installed
Mesa libraries and headers by simply NOT uncommenting the MesaDir
line below. */
/* #define UseMesa 1 /**/
/* #define MesaDir /usr/src/Mesa-3.0 /* UPDATE ME! */
#if 0
/* Linux users are assumed to be using Mesa. */
#ifdef LinuxArchitecture
#ifndef UseMesa
#define UseMesa 1
#endif
#endif
#endif
#ifdef UseMesa
XCOMM using Mesa (the Open Source OpenGL implementation by Brian Paul)
#ifdef MesaDir
MESA_DIR = MesaDir
MESA_INCLUDE = -I$(MESA_DIR)/include
MESA_LIB = -L$(MESA_DIR)/lib
#endif
MESAGL = $(MESA_LIB) -lMesaGL
MESAGLU = $(MESA_LIB) -lMesaGLU
#endif
#ifndef MathLibrary /* introduced with X11R6 */
#define MathLibrary -lm
#endif
#ifndef SaberProgramTarget /* in X11R5 but removed in X11R6 */
#define SaberProgramTarget(program,srclist,objlist,locallibs,syslibs)
#endif
#ifdef HasGnuMake
XCOMM Avoid issue where GNUmakefile can take precedence for spawned makes
MFLAGS += -f Makefile
#endif
#ifdef SunArchitecture
/*
* Solaris has a non-standard way of placing libraries
* and header files. This should work for Template Graphics Systems'
* OpenGL implementation, assuming your OGLHOME and OPENWINHOME
* environment variables are set correctly.
*/
EXTRA_INCLUDES = -I$(TOP)/include -I$(OGLHOME)/include -I$(OPENWINHOME)/include $(MESA_INCLUDE) $(LOCAL_INCLUDES)
#ifdef UseMesa
OPENGL = $(MESAGL)
GLU = $(MESAGLU)
#else
OPENGL = -L$(OGLHOME)/lib -lGL -L$(OPENWINHOME) -ldga
GLU = -L$(OGLHOME)/lib -lGLU
#endif
/* XXX Is this right, Template?? */
INVENTOR = -L$(OGLHOME)/lib -lInventor
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
#else /* Everybody but Sun... */
#ifdef AlphaArchitecture
/* Alpha suggestions from Andrej Panjkov (mataap@pop.latrobe.edu.au). */
/* Andrej writes: There is a bug in one of the imake configuration
files supplied with Digital Unix 3.2c that will cause the build to
fail. In the file /usr/lib/X11/config/osflib.tmpl, the reference to
libXi.a should be changed to libXi.so (which is in the correct
directory /usr/shlib). Root access is needed to fix this bug. I
don't know if the bug persists in later versions of DU. */
#if 0 /* Not using now. */
/*
* Digital puts all Imake symbols for use with OpenGL in OpenGL.tmpl, so use
* the contents of that file instead of the definitions here.
*/
#include <OpenGL.tmpl>
EXTRA_INCLUDES = GLUTInclude $(MESA_INCLUDE) $(LOCAL_INCLUDES)
#else
EXTRA_INCLUDES = -I$(TOP)/include $(MESA_INCLUDE) $(LOCAL_INCLUDES)
#endif
INVENTOR = -lInventor
/* Suggested by Andrej Panjkov (mataap@pop.latrobe.edu.au) */
DEPGLUTLIB = $(TOP)/lib/glut/libglut.a
GLUTLIB = $(TOP)/lib/glut/libglut.a
GLUT_LIBS = $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLUT_DEPLIBS = $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
MUI_LIBS = $(MUI) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLE_LIBS = $(GLE) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLSMAP_LIBS = $(GLSMAP) $(GLUTLIB) $(GLULIB) $(GLLIB) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
#else /* Everybody but Sun or DEC Alpha... */
/*
* This should work for normal vendors that put their OpenGL and X
* libraries and headers in standard places (or at least where
* imake configuration files know where they are).
*/
#ifdef HPArchitecture
/* Nate Robbins (E&S) reports that HP does not have its Xmu.h header in
the standard place. */
XMU_HEADERS = /usr/contrib/X11R5/include/
EXTRA_INCLUDES = -I$(TOP)/include -I$(XMU_HEADERS) $(MESA_INCLUDE) $(LOCAL_INCLUDES)
#else
EXTRA_INCLUDES = -I$(TOP)/include $(MESA_INCLUDE) -I$(ROOT)/usr/include $(LOCAL_INCLUDES)
LDPRELIBS = -L$(ROOT)/usr/lib -L$(USRLIBDIR)
#endif
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXLIB)
GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XLIB) MathLibrary
#ifdef UseMesa
OPENGL = $(MESAGL)
GLU = $(MESAGLU)
#else
OPENGL = -lGL
GLU = -lGLU
#endif
INVENTOR = -lInventor
GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
MUI_DEPLIBS = $(DEPMUI) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
MUI_LIBS = $(MUI) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLE_DEPLIBS = $(DEPGLE) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLE_LIBS = $(GLE) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
GLSMAP_DEPLIBS = $(DEPGLSMAP) $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
GLSMAP_LIBS = $(GLSMAP) $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
#endif
#endif
#ifndef AlphaArchitecture
DEPGLUT = $(TOP)/lib/glut/libglut.a
GLUT = $(TOP)/lib/glut/libglut.a
#endif
DEPMUI = $(TOP)/lib/mui/libmui.a
MUI = $(TOP)/lib/mui/libmui.a
DEPGLE = $(TOP)/lib/gle/libgle.a
GLE = $(TOP)/lib/gle/libgle.a
DEPGLSMAP = $(TOP)/lib/glsmap/libglsmap.a
GLSMAP = $(TOP)/lib/glsmap/libglsmap.a
CXXEXTRA_INCLUDES = -I/usr/include/CC $(EXTRA_INCLUDES) $(MESA_INCLUDE) $(LOCAL_INCLUDES)
GLUT_INVENTOR_DEPLIBS = $(GLUT_DEPLIBS)
GLUT_INVENTOR_LIBS = $(INVENTOR) $(GLUT_LIBS)
#ifdef SGIArchitecture
/* For SGI C++ compiler, need to search extra dirs in make depend */
#undef CplusplusDependIncludes
#define CplusplusDependIncludes -I$(ROOT)/usr/include/CC
#endif
#ifndef NullParameter
/*
* NullParameter should be #define'ed to nothing in Imake.rules, but it has
* been reported to me that this is not always the case. If not, let
* Glut.cf #define it to nothing.
*/
#define NullParameter
#endif
#define GlutTestProgramTarget(name) NormalProgramTarget(name,name.o,$(GLUT_DEPLIBS),$(GLUT_LIBS),NullParameter)
#define MuiTestProgramTarget(name) NormalProgramTarget(name,name.o,$(MUI_DEPLIBS),$(MUI_LIBS),NullParameter)
#define SimpleGlutProgramTarget(name) NormalProgramTarget(name,name.o,$(GLUT_DEPLIBS),$(GLUT_LIBS),NullParameter)
#define NormalGlutProgramTarget(name,objs) NormalProgramTarget(name,objs,$(GLUT_DEPLIBS),$(GLUT_LIBS),NullParameter)
#define SimpleMuiProgramTarget(name) NormalProgramTarget(name,name.o,$(MUI_DEPLIBS),$(MUI_LIBS),NullParameter)
#define NormalMuiProgramTarget(name,objs) NormalProgramTarget(name,objs,$(MUI_DEPLIBS),$(MUI_LIBS),NullParameter)
#define SimpleGleProgramTarget(name) NormalProgramTarget(name,name.o,$(GLE_DEPLIBS),$(GLE_LIBS),NullParameter)
#define NormalGleProgramTarget(name,objs) NormalProgramTarget(name,objs,$(GLE_DEPLIBS),$(GLE_LIBS),NullParameter)
#define SimpleGlsmapProgramTarget(name) NormalProgramTarget(name,name.o,$(GLSMAP_DEPLIBS),$(GLSMAP_LIBS),NullParameter)
#define NormalGlsmapProgramTarget(name,objs) NormalProgramTarget(name,objs,$(GLSMAP_DEPLIBS),$(GLSMAP_LIBS),NullParameter)
#define SimpleGlutInventorProgramTarget(name) NormalCplusplusProgramTarget(name,name.o,$(GLUT_INVENTOR_DEPLIBS),$(GLUT_INVENTOR_LIBS),NullParameter)
#define NormalGlutInventorProgramTarget(name,objs) NormalCplusplusProgramTarget(name,objs,$(GLUT_INVENTOR_DEPLIBS),$(GLUT_INVENTOR_LIBS),NullParameter)
XCOMM end Glut.cf - GLUT distribution Imakefile configuration info