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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
|
XCOMM
XCOMM Ygl: Run GL programs with standard X11 routines.
XCOMM (C) Fred Hucht 1993-2007
XCOMM EMail: fred(AT)thp.Uni-Duisburg.de
XCOMM
XCOMM $Id: Imakefile,v 4.5 2007-05-08 11:00:41+02 fred Exp $
XCOMM Set UseX11 to 1 if you want X11 bindings (faster, but only 2d)
#define UseX11 1
XCOMM Set UseOpenGL to 1 if you want OpenGL bindings
XCOMM (might be slower than X11, but also 3d)
#define UseOpenGL 1
XCOMM Set Has_GLX_SGI_video_sync to 0 if you get link errors like
XCOMM "ld: 0711-317 ERROR: Undefined symbol: .glXGetVideoSyncSGI"
XCOMM (e.g. under AIX 4.3)
#define Has_GLX_SGI_video_sync 0
XCOMM Set DoubleBuffer to 1 if your system has the include file
XCOMM <X11/extensions/Xdbe.h> and the library libXext.a
XCOMM This should be true for X11R6.1. Only nessesary with UseX11 == 1
#define DoubleBuffer 1
XCOMM Set MultiBuffer to 1 if your system has the include file
XCOMM <X11/extensions/multibuf.h> and the library libXext.a
XCOMM This should be true for X11R5. Only nessesary with UseX11 == 1
#define MultiBuffer 1
XCOMM Set FortranBindings to 1 to include FORTRAN bindings into
XCOMM the Ygl library.
#define FortranBindings 1
XCOMM Set UseGlobalColormap to 1 to use experimental colormap handling.
XCOMM You must have the include file <X11/Xmu/StdCmap.h> and libXmu.a
#define UseGlobalColormaps 0
XCOMM Set YglPrefix to 1 to prepend "ygl_" to all function names
#define YglPrefix 0
XCOMM ******* The following stuff is obsolete! ***************
XCOMM Set UseMesa to 1 if you want OpenGL bindings using Mesa.
XCOMM Don\'t define both UseOpenGL and UseMesa!
XCOMM If you installed Mesa with the OpenGL names (libGL.a etc.)
XCOMM set UseOpenGL to 1.
XCOMM You may have to change the path to the Mesa lib below...
#define UseMesa 0 /* NOT SUPPORTED YET... */
#if UseMesa
OGL = -I/usr/local/Mesa/include -DOGL
OGLIB = -L/usr/local/Mesa/lib -lMesaGL -lMesaGLU
#endif
XCOMM ***************** End of configuable part ********************
SOYGLREV = 4.2
#if !defined(DoSharedLib) && (defined(AIXArchitecture) || defined(RsArchitecture))
# define DoSharedLib 1
# undef DoNormalLib
# define DoNormalLib 0
#endif
#if defined(HPArchitecture) && !HasGcc2
#undef CCOPTIONS
CCOPTIONS = -Ae +ESlit
/* CCOPTIONS = -Aa -D_HPUX_SOURCE */
#endif
#ifdef MacIIArchitecture
XCOMM A/UX must have prefix due to naming conflict
#define YglForcePrefix 1
CCOPTIONS = -D_AUX_SOURCE
#endif
#if UseOpenGL && UseMesa
#error UseOpenGL and UseMesa are exclusive!!!
#endif
#if UseOpenGL
OGL = -DOGL
OGLIB = -lGL -lGLU
#endif
#if UseX11
X11 = -DX11
#if Has_GLX_SGI_video_sync
GSvs = -DGSvs
#endif
#if DoubleBuffer
DOUBLEBUF = -DDOUBLEBUF
#endif
#if MultiBuffer
MULTIBUF = -DMULTIBUF
#endif
#if DoubleBuffer || MultiBuffer
DMBUFLIB = -lXext
#endif
#if UseGlobalColormaps
HASXMU = -DHASXMU
THEXMULIB = -lXmu
#endif
#endif /* UseX11 */
#if YglPrefix
YGL_PREFIX = -DYGL_PREFIX
YGL_PREFIX_HDR = X11/Yglprefix.h
TARGET = Yglp
#else
TARGET = Ygl
#endif
#if YglForcePrefix /* A/UX */
YGL_PREFIX = -DYGL_PREFIX
YGL_PREFIX_HDR = X11/Yglprefix.h
#endif
DEFINES = $(OGL) $(X11) $(GSvs) $(DOUBLEBUF) $(MULTIBUF) $(HASXMU) $(YGL_PREFIX)
#if FortranBindings
FSRC = fortran.c
FOBJ = fortran.o
FHDR = X11/Yfgl.h
#endif
SRCS = ygl.c draw.c misc.c font.c queue.c color.c menu.c gl2ppm.c 3d.c $(FSRC)
OBJS = ygl.o draw.o misc.o font.o queue.o color.o menu.o gl2ppm.o 3d.o $(FOBJ)
INCLUDES = -I.
XLIBS = $(OGLIB) $(DMBUFLIB) $(THEXMULIB) -lX11
HEADERS = X11/Ygl.h X11/Ygltypes.h $(FHDR) $(YGL_PREFIX_HDR)
INCDIR = $(INCROOT)/X11
REQUIREDLIBS = -L$(USRLIBDIR) $(XLIBS)
#if defined(AIXArchitecture) || defined(RsArchitecture)
CC = xlc -qinfo
#endif
#if ProjectX > 5
XCOMM This stuff and more contributed by Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
# undef BuildIncludesTop
# define BuildIncludesTop(x)
# define LibName $(TARGET)
# define SoRev SOYGLREV
# ifndef DoSharedLib
# define DoSharedLib HasSharedLibraries
# endif
# ifndef DoNormalLib
# define DoNormalLib (!DoSharedLib || ForceNormalLib)
# endif
# include <Library.tmpl>
#else /* ProjectX > 5 */
# if DoSharedLib
SharedLibraryTarget ($(TARGET),ShlibRev,$(OBJS),.,.)
InstallSharedLibrary($(TARGET),ShlibRev,$(USRLIBDIR))
# endif /* DoSharedLib */
# if DoNormalLib
NormalLibraryTarget($(TARGET),$(OBJS))
InstallLibrary($(TARGET),$(USRLIBDIR))
# endif /* DoNormalLib */
INSTALLFLAGS = $(INSTINCFLAGS)
InstallMultiple($(HEADERS),$(INCDIR))
#endif /* ProjectX > 5 */
DependTarget()
$(YGL_PREFIX_HDR): makeYglprefix X11/Ygl.h
./makeYglprefix > $@
X11/Ygltypes.h: makeYgltypes
./makeYgltypes > $@
makeYgltypes: makeYgltypes.c
$(CC) $(CFLAGS) -o makeYgltypes makeYgltypes.c
usleep.i: header.h
$(RM) usleep_tst.c
$(LN) header.h usleep_tst.c
$(CC) $(CFLAGS) -E usleep_tst.c > usleep.i
$(RM) usleep_tst.c
usleep.h: usleep.i
sed -nf makeusleep.sed usleep.i > usleep.h
misc.o: usleep.h
#if UseOpenGL || UseMesa
XCOMM For directory examples
THREE_D_TARGETS = lmbind
#endif
#define IHaveSubdirs
#define PassCDebugFlags 'THREE_D_TARGETS=$(THREE_D_TARGETS)'
SUBDIRS = examples
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
includes:: X11/Ygltypes.h $(YGL_PREFIX_HDR) usleep.h
$(OBJS): X11/Ygltypes.h $(YGL_PREFIX_HDR)
etags::
etags $(SRCS) header.h config.h X11/Ygl.h
clean::
$(RM) a.out makeYgltypes usleep.h usleep.i
cd X11 ; $(RM) Yglprefix.h Ygltypes.h *~ ; cd ..
#if ProjectX < 6
lint::
$(LINT) -MA $(ALLDEFINES) $(LINTOPTS) -Nn10000 -Nd10000 $(SRCS)
#endif
|