On Wed, 15 Oct 2003 21:53:17 +0200 Michel Dänzer <[EMAIL PROTECTED]> wrote:
> On Wed, 2003-10-15 at 18:50, Felix Kühling wrote: > > > > Oops, xmlconfig.o gets linked into all drivers, even those that don't > > use it. BTW, the same is true for all object files in > > xc/lib/GL/mesa/src/drv/common. How should files in the common directory > > be handled that are not used by all drivers? > > Change the drivers which don't use everything to explicitly link only > what they need? Or change common/Imakefile.inc to allow customization > via #defines or whatever? I looked through the Imakefiles in order to resolve this. I found that hwlog.o is not needed at all any more. vblank.o and xmlconfig.o are only needed by mga, r128, r200 and radeon so far. The other objects (mm.o, texmem.o and utils.o) seem to be used by all drivers. I'm not 100% sure about texmem though. The attached patch splits COMMONOBJS into COMMONOBJS, VBLANKOBJS and XMLCONFIGOBJS so that the individual driver Imakefiles can select those objects from the common subdir that they really need. It also removes hwlog.o from COMMONOBJS completely. If noone objects I'm going to commit this. > -- > Earthling Michel Dänzer \ Debian (powerpc), XFree86 and DRI developer > Software libre enthusiast \ http://svcs.affero.net/rm.php?r=daenzer Regards, Felix ------------ __\|/__ ___ ___ ------------------------- Felix ___\_e -_/___/ __\___/ __\_____ You can do anything, Kühling (_____\Ä/____/ /_____/ /________) just not everything [EMAIL PROTECTED] \___/ \___/ U at the same time.
Index: common/Imakefile =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/common/Imakefile,v retrieving revision 1.9 diff -u -r1.9 Imakefile --- common/Imakefile 9 Oct 2003 09:55:58 -0000 1.9 +++ common/Imakefile 15 Oct 2003 22:56:13 -0000 @@ -29,8 +29,8 @@ DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) $(EXPATINCLUDES) - SRCS = $(COMMONSRCS) - OBJS = $(COMMONOBJS) + SRCS = $(COMMONSRCS) $(VBLANKSRCS) $(XMLCONFIGSRCS) + OBJS = $(COMMONOBJS) $(VBLANKOBJS) $(XMLCONFIGOBJS) #include <Library.tmpl> Index: common/Imakefile.inc =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/common/Imakefile.inc,v retrieving revision 1.6 diff -u -r1.6 Imakefile.inc --- common/Imakefile.inc 9 Oct 2003 09:55:58 -0000 1.6 +++ common/Imakefile.inc 15 Oct 2003 22:56:13 -0000 @@ -32,40 +32,35 @@ -I$(MESADRVSRCDIR)/common X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) - COMMONSRCS = $(MESADRVCOMMONBUILDDIR)hwlog.c \ - $(MESADRVCOMMONBUILDDIR)mm.c \ + COMMONSRCS = $(MESADRVCOMMONBUILDDIR)mm.c \ $(MESADRVCOMMONBUILDDIR)utils.c \ - $(MESADRVCOMMONBUILDDIR)vblank.c \ - $(MESADRVCOMMONBUILDDIR)texmem.c \ - $(MESADRVCOMMONBUILDDIR)xmlconfig.c + $(MESADRVCOMMONBUILDDIR)texmem.c + VBLANKSRCS = $(MESADRVCOMMONBUILDDIR)vblank.c + XMLCONFIGSRCS = $(MESADRVCOMMONBUILDDIR)xmlconfig.c - COMMONOBJS = $(MESADRVCOMMONBUILDDIR)hwlog.o \ - $(MESADRVCOMMONBUILDDIR)mm.o \ + COMMONOBJS = $(MESADRVCOMMONBUILDDIR)mm.o \ $(MESADRVCOMMONBUILDDIR)utils.o \ - $(MESADRVCOMMONBUILDDIR)vblank.o \ - $(MESADRVCOMMONBUILDDIR)texmem.o \ - $(MESADRVCOMMONBUILDDIR)xmlconfig.o + $(MESADRVCOMMONBUILDDIR)texmem.o + VBLANKOBJS = $(MESADRVCOMMONBUILDDIR)vblank.o + XMLCONFIGOBJS = $(MESADRVCOMMONBUILDDIR)xmlconfig.o - COMMONUOBJS = $(MESADRVCOMMONBUILDDIR)unshared/hwlog.o \ - $(MESADRVCOMMONBUILDDIR)unshared/mm.o \ + COMMONUOBJS = $(MESADRVCOMMONBUILDDIR)unshared/mm.o \ $(MESADRVCOMMONBUILDDIR)unshared/utils.o \ - $(MESADRVCOMMONBUILDDIR)unshared/vblank.o \ - $(MESADRVCOMMONBUILDDIR)unshared/texmem.o \ - $(MESADRVCOMMONBUILDDIR)unshared/xmlconfig.o + $(MESADRVCOMMONBUILDDIR)unshared/texmem.o + VBLANKUOBJS = $(MESADRVCOMMONBUILDDIR)unshared/vblank.o + XMLCONFIGUOBJS = $(MESADRVCOMMONBUILDDIR)unshared/xmlconfig.o - COMMONDOBJS = $(MESADRVCOMMONBUILDDIR)debugger/hwlog.o \ - $(MESADRVCOMMONBUILDDIR)debugger/mm.o \ + COMMONDOBJS = $(MESADRVCOMMONBUILDDIR)debugger/mm.o \ $(MESADRVCOMMONBUILDDIR)debugger/utils.o \ - $(MESADRVCOMMONBUILDDIR)debugger/vblank.o \ - $(MESADRVCOMMONBUILDDIR)debugger/texmem.o \ - $(MESADRVCOMMONBUILDDIR)debugger/xmlconfig.o + $(MESADRVCOMMONBUILDDIR)debugger/texmem.o + VBLANKDOBJS = $(MESADRVCOMMONBUILDDIR)debugger/vblank.o + XMLCONFIGDOBJS = $(MESADRVCOMMONBUILDDIR)debugger/xmlconfig.o - COMMONPOBJS = $(MESADRVCOMMONBUILDDIR)profiled/hwlog.o \ - $(MESADRVCOMMONBUILDDIR)profiled/mm.o \ + COMMONPOBJS = $(MESADRVCOMMONBUILDDIR)profiled/mm.o \ $(MESADRVCOMMONBUILDDIR)profiled/utils.o \ - $(MESADRVCOMMONBUILDDIR)profiled/vblank.o \ - $(MESADRVCOMMONBUILDDIR)profiled/texmem.o \ - $(MESADRVCOMMONBUILDDIR)profiled/xmlconfig.o + $(MESADRVCOMMONBUILDDIR)profiled/texmem.o + VBLANKPOBJS = $(MESADRVCOMMONBUILDDIR)profiled/vblank.o + XMLCONFIGPOBJS = $(MESADRVCOMMONBUILDDIR)profiled/xmlconfig.o #ifdef NeedToLinkMesaSrc LinkSourceFile(hwlog.c, $(MESADRVSRCDIR)/common) Index: common/mm.c =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/common/mm.c,v retrieving revision 1.9 diff -u -r1.9 mm.c --- common/mm.c 26 Sep 2003 13:52:43 -0000 1.9 +++ common/mm.c 15 Oct 2003 22:56:13 -0000 @@ -27,7 +27,6 @@ #include <stdio.h> #include "mm.h" -#include "hwlog.h" void mmDumpMemInfo( memHeap_t *heap ) Index: mga/Imakefile =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/mga/Imakefile,v retrieving revision 1.34 diff -u -r1.34 Imakefile --- mga/Imakefile 9 Oct 2003 09:55:58 -0000 1.34 +++ mga/Imakefile 15 Oct 2003 22:56:15 -0000 @@ -54,7 +54,8 @@ SRCS = $(MGASRCS) OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ - $(MESA_ASM_OBJS) $(COMMONOBJS) $(MGAOBJS) $(HIOBJS) + $(MESA_ASM_OBJS) $(COMMONOBJS) $(VBLANKOBJS) $(XMLCONFIGOBJS) \ + $(MGAOBJS) $(HIOBJS) REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) $(EXPATLIB) Index: r128/Imakefile =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/r128/Imakefile,v retrieving revision 1.29 diff -u -r1.29 Imakefile --- r128/Imakefile 9 Oct 2003 09:55:58 -0000 1.29 +++ r128/Imakefile 15 Oct 2003 22:56:15 -0000 @@ -53,7 +53,8 @@ SRCS = $(R128SRCS) OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ - $(MESA_ASM_OBJS) $(COMMONOBJS) $(R128OBJS) $(HIOBJS) + $(MESA_ASM_OBJS) $(COMMONOBJS) $(VBLANKOBJS) $(XMLCONFIGOBJS) \ + $(R128OBJS) $(HIOBJS) REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) $(EXPATLIB) Index: r200/Imakefile =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/r200/Imakefile,v retrieving revision 1.4 diff -u -r1.4 Imakefile --- r200/Imakefile 9 Oct 2003 09:55:58 -0000 1.4 +++ r200/Imakefile 15 Oct 2003 22:56:15 -0000 @@ -52,7 +52,8 @@ SRCS = $(R200SRCS) OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ - $(MESA_ASM_OBJS) $(COMMONOBJS) $(R200OBJS) $(HIOBJS) + $(MESA_ASM_OBJS) $(COMMONOBJS) $(VBLANKOBJS) $(XMLCONFIGOBJS) \ + $(R200OBJS) $(HIOBJS) REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(EXPATLIB) Index: radeon/Imakefile =================================================================== RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/radeon/Imakefile,v retrieving revision 1.17 diff -u -r1.17 Imakefile --- radeon/Imakefile 9 Oct 2003 09:55:58 -0000 1.17 +++ radeon/Imakefile 15 Oct 2003 22:56:15 -0000 @@ -52,7 +52,8 @@ SRCS = $(RADEONSRCS) OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ - $(MESA_ASM_OBJS) $(COMMONOBJS) $(RADEONOBJS) $(HIOBJS) + $(MESA_ASM_OBJS) $(COMMONOBJS) $(VBLANKOBJS) $(XMLCONFIGOBJS) \ + $(RADEONOBJS) $(HIOBJS) REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) $(EXPATLIB)