XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.16 2000/03/02 16:07:30 martin Exp $ #include #define IHaveSubdirs #define PassCDebugFlags #define DoNormalLib NormalLibGlx #define DoSharedLib SharedLibGlx #define DoExtraLib SharedLibGlx #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx LIBNAME = GL SOREV = $(SOGLREV) #ifdef SharedGLReqs REQUIREDLIBS = SharedGLReqs #endif #if 0 LOWSRC = lowpc.c LOWOBJ = lowpc.o HISRC = highpc.c HIOBJ = highpc.o #endif GLXOBJS = glx/?*.o GLXUOBJS = glx/unshared/?*.o GLXDOBJS = glx/debugger/?*.o GLXPOBJS = glx/profiled/?*.o GLXDONES = glx/DONE #if BuildXF86DRI DRIOBJS = dri/XF86dri.o dri/dri_glx.o DRIUOBJS = dri/unshared/XF86dri.o dri/unshared/dri_glx.o DRIDOBJS = dri/debugger/XF86dri.o dri/debugger/dri_glx.o DRIPOBJS = dri/profiled/XF86dri.o dri/profiled/dri_glx.o DRIDONES = dri/DONE DRMOBJS = dri/drm/?*.o DRMUOBJS = dri/drm/unshared/?*.o DRMDOBJS = dri/drm/debugger/?*.o DRMPOBJS = dri/drm/profiled/?*.o DRMDONES = dri/drm/DONE MESAOBJS = mesa/src/?*.o mesa/src/X86/?*.o MESAUOBJS = mesa/src/unshared/?*.o mesa/src/X86/unshared/?*.o MESADOBJS = mesa/src/debugger/?*.o mesa/src/X86/debugger/?*.o MESAPOBJS = mesa/src/profiled/?*.o mesa/src/X86/profiled/?*.o MESADONES = mesa/src/DONE mesa/src/X86/DONE DRIMESAOBJS = mesa/dri/?*.o DRIMESAUOBJS = mesa/dri/unshared/?*.o DRIMESADOBJS = mesa/dri/debugger/?*.o DRIMESAPOBJS = mesa/dri/profiled/?*.o DRIMESADONES = mesa/dri/DONE COMMONOBJS = mesa/src/drv/common/?*.o COMMONUOBJS = mesa/src/drv/common/unshared/?*.o COMMONDOBJS = mesa/src/drv/common/debugger/?*.o COMMONPOBJS = mesa/src/drv/common/profiled/?*.o COMMONDONES = mesa/src/drv/common/DONE #if GlxUseSGISI XCOMM nothing #elif GlxBuiltInGamma GAMMAOBJS = mesa/src/drv/gamma/?*.o GAMMAUOBJS = mesa/src/drv/gamma/unshared/?*.o GAMMADOBJS = mesa/src/drv/gamma/debugger/?*.o GAMMAPOBJS = mesa/src/drv/gamma/profiled/?*.o GAMMADONES = mesa/src/drv/gamma/DONE DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) DRVDONES = $(GAMMADONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #elif GlxBuiltInTdfx TDFXOBJS = mesa/src/drv/tdfx/?*.o TDFXUOBJS = mesa/src/drv/tdfx/unshared/?*.o TDFXDOBJS = mesa/src/drv/tdfx/debugger/?*.o TDFXPOBJS = mesa/src/drv/tdfx/profiled/?*.o TDFXDONES = mesa/src/drv/tdfx/DONE DRVOBJS = $(TDFXOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) DRVDONES = $(TDFXDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) REQUIREDLIBS += -lglide3x GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #elif GlxBuiltInI810 I810OBJS = mesa/src/drv/i810/?*.o I810UOBJS = mesa/src/drv/i810/unshared/?*.o I810DOBJS = mesa/src/drv/i810/debugger/?*.o I810POBJS = mesa/src/drv/i810/profiled/?*.o I810DONES = mesa/src/drv/i810/DONE DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) DRVDONES = $(I810DONES) $(COMMONDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #elif GlxBuiltInMga MGAOBJS = mesa/src/drv/mga/?*.o MGAUOBJS = mesa/src/drv/mga/unshared/?*.o MGADOBJS = mesa/src/drv/mga/debugger/?*.o MGAPOBJS = mesa/src/drv/mga/profiled/?*.o MGADONES = mesa/src/drv/mga/DONE DRVOBJS = $(MGAOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) DRVUOBJS = $(MGAUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(MGADOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(MGAPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) DRVDONES = $(MGADONES) $(COMMONDONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #elif GlxBuiltInR128 R128OBJS = mesa/src/drv/r128/?*.o R128UOBJS = mesa/src/drv/r128/unshared/?*.o R128DOBJS = mesa/src/drv/r128/debugger/?*.o R128POBJS = mesa/src/drv/r128/profiled/?*.o R128DONES = mesa/src/drv/r128/DONE DRVOBJS = $(R128OBJS) $(MESAOBJS) $(DRIMESAOBJS) $(DRMOBJS) DRVUOBJS = $(R128UOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(R128DOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(R128POBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) DRVDONES = $(R128DONES) $(MESADONES) $(DRIMESADONES) $(DRMDONES) GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #elif GlxBuiltInMesa #ifndef GlxDriverUsesMesa DRVOBJS = mesa/src/?*.o DRVUOBJS = mesa/src/unshared/?*.o DRVDOBJS = mesa/src/debugger/?*.o DRVPOBJS = mesa/src/profiled/?*.o DRVDONES = mesa/src/DONE GLXSUBDIRS = glx dri mesa/dri mesa/include/GL mesa/src #endif #else XCOMM No built-in drivers. This is the usual case. GLXSUBDIRS = glx dri #endif #else XCOMM BuildXF86DRI was not defined. Just build an indirect-only libGL. GLXSUBDIRS = glx #endif #if BuildXF86DRI SUBDIRS = $(GLXSUBDIRS) OTHERSUBDIRS = mesa/dri mesa/include/GL mesa/src #else SUBDIRS = glx #endif MakeSubdirs($(SUBDIRS)) MakefileSubdirs($(OTHERSUBDIRS)) DependSubdirs($(SUBDIRS) $(OTHERSUBDIRS)) #ifdef OS2Architecture OBJS = $(LIBNAME).a #else OBJS = $(LOWOBJ) $(GLXOBJS) $(DRIOBJS) $(DRVOBJS) $(HIOBJ) #endif #if HasSharedLibraries #if 1 UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS) #else UOBJS = $(OBJS) #endif #else UOBJS = $(OBJS) #endif DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS) POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS) DONES = $(GLXDONES) $(DRIDONES) $(DRVDONES) #if 0 SubdirLibraryRule(highpc.o lowpc.o) NormalLintTarget(highpc.c lowpc.c) #endif #if LocalThreads THREADOBJS = $(THREADS_LIBS) #endif #include #undef _LinkBuildLibrary #define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) #if NormalLibGlx NormalDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(UOBJS)) InstallLibrary($(LIBNAME),$(USRLIBDIR)) #endif #if SharedLibGlx SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(GLXSUBDIRS) $(DONES),$(OBJS) $(THREADOBJS),.,.) InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) #if LinkGLToUsrLib && AlternateUsrLibDir install:: $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so $(LN) $(SHLIBDIR)/lib$(LIBNAME).so $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 $(LN) $(SHLIBDIR)/lib$(LIBNAME).so.1 $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1 #endif #endif #if DebugLibGlx DebuggedDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(DOBJS)) InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) #endif #if ProfileLibGlx ProfiledDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(POBJS)) InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) #endif XCOMM libGL has now been made, continue with building the drivers. #if BuildXF86DRI && !GlxBuiltInGamma && !GlxBuiltInTdfx && !GlxBuiltInI810 && !GlxBuiltInMga && !GlxBuiltInMesa DRIVERSUBDIRS = mesa/dri mesa/include/GL mesa/src MakeSubdirs($(DRIVERSUBDIRS)) DependSubdirs($(DRIVERSUBDIRS)) InstallSubdirs($(DRIVERSUBDIRS)) #endif