[SDL] Adding a new video driver to the build

Coleman Kane ckane at intellitree.com
Tue May 15 12:34:00 PDT 2007


> -----Original Message-----
> From: sdl-bounces at lists.libsdl.org 
> [mailto:sdl-bounces at lists.libsdl.org] On Behalf Of Ulrich Eckhardt
> Sent: Tuesday, May 15, 2007 1:15 PM
> To: sdl at lists.libsdl.org
> Subject: Re: [SDL] Adding a new video driver to the build
> 
> On Tuesday 15 May 2007 19:39:13 Brian Gunn wrote:
> > How can I add a new video driver to the build?  I managed 
> to get it to 
> > "work" somewhat by modifying the Makefile, but it still 
> doesn't work 
> > like I want because I still need to link the test programs with my 
> > SDL_XXX_video.o.  And I'm sure modifying the Makefile isn't 
> the right 
> > way to do this anyway since it's created from Makefile.in.
> >
> > What's the correct way to add a new video driver to the build?
> 
> Well, typically you add the sourcefile to the Makefile.in and 
> rerun the autotools or type 'make', which does this for you.
> 
> Just one remark though: sometimes, the Makefile.in is 
> generated, too, from the Makefile.am (I hope I'm not 
> switching those around now, don't have the SDL sources in 
> front of me). Then, you add the sourcefile(s) to that file of course.
> 
> Uli
> 

SDL doesn't seem to use automake for its Makefile generation. Rather, it uses a Makefile.minimal and does a wildcard search of ever *.c located in specific subdirectories of src/. The Makefile.minimal defines these in the SOURCES variable.

For the most part, it could be as simple as placing the .c file into a folder already listed in SOURCES, and then re-run configure, followed by make. Make sure the header that prototypes your new functions (if any) is located in include/.

--
Coleman Kane


More information about the SDL mailing list