mesa: simplify dependencies in mmakefiles
[AROS.git] / workbench / hidds / softpipe / init.c
blobf67b8e5361c6e4b66d846da8ed71b0d39c7bd51d
1 /*
2 Copyright 2010, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <hidd/gallium.h>
8 #include <proto/oop.h>
9 #include <proto/exec.h>
11 #include "softpipe_intern.h"
13 static int SoftpipeHidd_ExpungeLib(LIBBASETYPEPTR LIBBASE)
15 if (LIBBASE->sd.SoftpipeCyberGfxBase)
16 CloseLibrary(LIBBASE->sd.SoftpipeCyberGfxBase);
18 if (LIBBASE->sd.hiddGalliumAB)
19 OOP_ReleaseAttrBase((STRPTR)IID_Hidd_Gallium);
21 return TRUE;
24 static int SoftpipeHidd_InitLib(LIBBASETYPEPTR LIBBASE)
26 LIBBASE->sd.SoftpipeCyberGfxBase = OpenLibrary((STRPTR)"cybergraphics.library",0);
28 LIBBASE->sd.hiddGalliumAB = OOP_ObtainAttrBase((STRPTR)IID_Hidd_Gallium);
30 if (LIBBASE->sd.SoftpipeCyberGfxBase && LIBBASE->sd.hiddGalliumAB)
31 return TRUE;
33 return FALSE;
36 ADD2INITLIB(SoftpipeHidd_InitLib, 0)
37 ADD2EXPUNGELIB(SoftpipeHidd_ExpungeLib, 0)
39 ADD2LIBS((STRPTR)"gallium.hidd", 7, static struct Library *, GalliumHiddBase);