"Fossies" - the Fresh Open Source Software Archive

Member "Ygl-4.2/Imakefile" (24 Aug 2011, 5903 Bytes) of package /linux/misc/Ygl-4.2g.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Imakefile": 4.2f_vs_4.2g.

    1 XCOMM
    2 XCOMM    Ygl: Run GL programs with standard X11 routines.
    3 XCOMM    (C) Fred Hucht 1993-2007
    4 XCOMM    EMail: fred(AT)thp.Uni-Duisburg.de
    5 XCOMM
    6 XCOMM    $Id: Imakefile,v 4.5 2007-05-08 11:00:41+02 fred Exp $
    7 
    8 XCOMM  Set UseX11 to 1 if you want X11 bindings (faster, but only 2d)
    9 #define UseX11    1
   10 
   11 XCOMM  Set UseOpenGL to 1 if you want OpenGL bindings
   12 XCOMM  (might be slower than X11, but also 3d)
   13 #define UseOpenGL 1
   14 
   15 XCOMM  Set Has_GLX_SGI_video_sync to 0 if you get link errors like
   16 XCOMM  "ld: 0711-317 ERROR: Undefined symbol: .glXGetVideoSyncSGI"
   17 XCOMM  (e.g. under AIX 4.3)
   18 #define Has_GLX_SGI_video_sync 0
   19 
   20 XCOMM  Set DoubleBuffer to 1 if your system has the include file
   21 XCOMM  <X11/extensions/Xdbe.h> and the library libXext.a
   22 XCOMM  This should be true for X11R6.1. Only nessesary with UseX11 == 1
   23 #define DoubleBuffer 1
   24 
   25 XCOMM  Set MultiBuffer to 1 if your system has the include file
   26 XCOMM  <X11/extensions/multibuf.h> and the library libXext.a
   27 XCOMM  This should be true for X11R5. Only nessesary with UseX11 == 1
   28 #define MultiBuffer 1
   29 
   30 XCOMM  Set FortranBindings to 1 to include FORTRAN bindings into
   31 XCOMM  the Ygl library.
   32 #define FortranBindings 1
   33 
   34 XCOMM  Set UseGlobalColormap to 1 to use experimental colormap handling.
   35 XCOMM  You must have the include file <X11/Xmu/StdCmap.h> and libXmu.a
   36 #define UseGlobalColormaps 0
   37 
   38 XCOMM  Use the following to fix a bug in Apple OSX XCode 3.0
   39 #SHLIBGLOBALSFLAGS="-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
   40 
   41 XCOMM  Set YglPrefix to 1 to prepend "ygl_" to all function names
   42 #define YglPrefix 0
   43 
   44 XCOMM  ******* The following stuff is obsolete! ***************
   45 XCOMM  Set UseMesa to 1 if you want OpenGL bindings using Mesa.
   46 XCOMM  Don\'t define both UseOpenGL and UseMesa!
   47 XCOMM  If you installed Mesa with the OpenGL names (libGL.a etc.)
   48 XCOMM  set UseOpenGL to 1.
   49 XCOMM  You may have to change the path to the Mesa lib below...
   50 #define UseMesa   0 /* NOT SUPPORTED YET... */
   51 #if UseMesa
   52 OGL		=	-I/usr/local/Mesa/include -DOGL
   53 OGLIB		=	-L/usr/local/Mesa/lib -lMesaGL -lMesaGLU
   54 #endif
   55 
   56 XCOMM ***************** End of configuable part ********************
   57 
   58 SOYGLREV = 4.2
   59 
   60 #if !defined(DoSharedLib) && (defined(AIXArchitecture) || defined(RsArchitecture))
   61 # define DoSharedLib 1
   62 # undef  DoNormalLib
   63 # define DoNormalLib 0
   64 #endif
   65 
   66 #if defined(HPArchitecture) && !HasGcc2
   67 #undef CCOPTIONS
   68 CCOPTIONS       =       -Ae +ESlit
   69 /* CCOPTIONS	=	-Aa -D_HPUX_SOURCE */
   70 #endif
   71 
   72 #ifdef MacIIArchitecture
   73 XCOMM A/UX must have prefix due to naming conflict
   74 #define YglForcePrefix 1
   75 CCOPTIONS	=	-D_AUX_SOURCE
   76 #endif
   77 
   78 #if UseOpenGL && UseMesa
   79 #error UseOpenGL and UseMesa are exclusive!!!
   80 #endif
   81 
   82 #if UseOpenGL
   83 # ifdef DarwinArchitecture
   84 OGL		=	-I/usr/X11/include -DOGL
   85 OGLIB		=	-L/usr/X11/lib -lGL -lGLU
   86 # else
   87 OGL		=	-DOGL
   88 OGLIB		=	-lGL -lGLU
   89 # endif
   90 #endif
   91 
   92 #if UseX11
   93 X11		=	-DX11
   94 
   95 #if Has_GLX_SGI_video_sync
   96 GSvs		=	-DGSvs
   97 #endif
   98 
   99 #if DoubleBuffer
  100 DOUBLEBUF	=	-DDOUBLEBUF
  101 #endif
  102 
  103 #if MultiBuffer
  104 MULTIBUF	=	-DMULTIBUF
  105 #endif
  106 
  107 #if DoubleBuffer || MultiBuffer
  108 DMBUFLIB 	= 	-lXext
  109 #endif
  110 
  111 #if UseGlobalColormaps
  112 HASXMU		=	-DHASXMU
  113 THEXMULIB	=	-lXmu
  114 #endif
  115 #endif /* UseX11 */
  116 
  117 #if YglPrefix
  118 YGL_PREFIX 	= 	-DYGL_PREFIX
  119 YGL_PREFIX_HDR	=	X11/Yglprefix.h
  120 TARGET		= 	Yglp
  121 #else
  122 TARGET		= 	Ygl
  123 #endif
  124 
  125 #if YglForcePrefix /* A/UX */
  126 YGL_PREFIX 	= 	-DYGL_PREFIX
  127 YGL_PREFIX_HDR	=	X11/Yglprefix.h
  128 #endif
  129 
  130 DEFINES 	= 	$(OGL) $(X11) $(GSvs) $(DOUBLEBUF) $(MULTIBUF) $(HASXMU) $(YGL_PREFIX)
  131 
  132 #if FortranBindings
  133 FSRC 		= 	fortran.c
  134 FOBJ 		= 	fortran.o
  135 FHDR 		= 	X11/Yfgl.h
  136 #endif
  137 
  138 SRCS = ygl.c draw.c misc.c font.c queue.c color.c menu.c gl2ppm.c 3d.c $(FSRC)
  139 OBJS = ygl.o draw.o misc.o font.o queue.o color.o menu.o gl2ppm.o 3d.o $(FOBJ)
  140 
  141 INCLUDES 	= 	-I.
  142 XLIBS		= 	$(OGLIB) $(DMBUFLIB) $(THEXMULIB) -lX11
  143 HEADERS 	= 	X11/Ygl.h X11/Ygltypes.h $(FHDR) $(YGL_PREFIX_HDR)
  144 INCDIR		=	$(INCROOT)/X11
  145 
  146 REQUIREDLIBS	=	-L$(USRLIBDIR) $(XLIBS)
  147 
  148 #if defined(AIXArchitecture) || defined(RsArchitecture)
  149 CC              =       xlc -qinfo
  150 #endif
  151 
  152 #if ProjectX > 5
  153 XCOMM This stuff and more contributed by Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
  154 # undef BuildIncludesTop
  155 # define BuildIncludesTop(x)
  156 # define LibName $(TARGET)
  157 # define SoRev SOYGLREV
  158 # ifndef DoSharedLib
  159 #  define DoSharedLib HasSharedLibraries
  160 # endif
  161 # ifndef DoNormalLib
  162 #  define DoNormalLib (!DoSharedLib || ForceNormalLib)
  163 # endif
  164 # include <Library.tmpl>
  165 
  166 #else /* ProjectX > 5 */
  167 
  168 # if DoSharedLib
  169 SharedLibraryTarget ($(TARGET),ShlibRev,$(OBJS),.,.)
  170 InstallSharedLibrary($(TARGET),ShlibRev,$(USRLIBDIR))
  171 # endif /* DoSharedLib */
  172 # if DoNormalLib
  173 NormalLibraryTarget($(TARGET),$(OBJS))
  174 InstallLibrary($(TARGET),$(USRLIBDIR))
  175 # endif /* DoNormalLib */
  176 
  177 INSTALLFLAGS = $(INSTINCFLAGS)
  178 
  179 InstallMultiple($(HEADERS),$(INCDIR))
  180 
  181 #endif /* ProjectX > 5 */
  182 
  183 DependTarget()
  184 
  185 $(YGL_PREFIX_HDR):	makeYglprefix X11/Ygl.h
  186 	./makeYglprefix > $@
  187 
  188 X11/Ygltypes.h:		makeYgltypes
  189 	./makeYgltypes > $@
  190 
  191 makeYgltypes:		makeYgltypes.c
  192 	$(CC) $(CFLAGS) -o makeYgltypes makeYgltypes.c
  193 
  194 usleep.i:	header.h
  195 	$(RM) usleep_tst.c
  196 	$(LN) header.h usleep_tst.c
  197 	$(CC) $(CFLAGS) -E usleep_tst.c > usleep.i
  198 	$(RM) usleep_tst.c
  199 
  200 usleep.h:	usleep.i
  201 	sed -nf makeusleep.sed usleep.i > usleep.h
  202 
  203 misc.o:		usleep.h
  204 
  205 #if UseOpenGL || UseMesa
  206 XCOMM For directory examples
  207 THREE_D_TARGETS = lmbind
  208 #endif
  209 
  210 #define IHaveSubdirs
  211 #define PassCDebugFlags 'THREE_D_TARGETS=$(THREE_D_TARGETS)'
  212 SUBDIRS = examples
  213 MakeSubdirs($(SUBDIRS))
  214 DependSubdirs($(SUBDIRS))
  215 
  216 includes::	X11/Ygltypes.h $(YGL_PREFIX_HDR) usleep.h
  217 
  218 $(OBJS):	X11/Ygltypes.h $(YGL_PREFIX_HDR)
  219 
  220 etags::
  221 	etags $(SRCS) header.h config.h X11/Ygl.h
  222 
  223 clean::
  224 	$(RM) a.out makeYgltypes usleep.h usleep.i
  225 	cd X11 ; $(RM) Yglprefix.h Ygltypes.h *~ ; cd ..
  226 
  227 #if ProjectX < 6
  228 lint::
  229 	$(LINT) -MA $(ALLDEFINES) $(LINTOPTS) -Nn10000 -Nd10000 $(SRCS)
  230 #endif