Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 4187

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Drivers with Several Source Files</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Writing an ALSA Driver" /><link rel="up" href="ch15.html" title="Chapter&#160;15.&#160;How To Put Your Driver Into ALSA Tree" /><link rel="prev" href="ch15s02.html" title="Driver with A Single Source File" /><link rel="next" href="ch16.html" title="Chapter&#160;16.&#160;Useful Functions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Drivers with Several Source Files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch15s02.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;15.&#160;How To Put Your Driver Into ALSA Tree</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch16.html">Next</a></td></tr></table><hr /></div><div class="section" title="Drivers with Several Source Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2743002"></a>Drivers with Several Source Files</h2></div></div></div><p>
	Suppose that the driver snd-xyz have several source files.
	They are located in the new subdirectory,
	pci/xyz.

	</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
	Add a new directory (<code class="filename">xyz</code>) in
	<code class="filename">alsa-driver/pci/Makefile</code> as below

      </p><div class="informalexample"><pre class="programlisting">

  obj-$(CONFIG_SND) += xyz/

        </pre></div><p>
	</p></li><li class="listitem"><p>
	Under the directory <code class="filename">xyz</code>, create a Makefile

      </p><div class="example"><a id="id2743055"></a><p class="title"><b>Example&#160;15.1.&#160;Sample Makefile for a driver xyz</b></p><div class="example-contents"><pre class="programlisting">

  ifndef SND_TOPDIR
  SND_TOPDIR=../..
  endif

  include $(SND_TOPDIR)/toplevel.config
  include $(SND_TOPDIR)/Makefile.conf

  snd-xyz-objs := xyz.o abc.o def.o

  obj-$(CONFIG_SND_XYZ) += snd-xyz.o

  include $(SND_TOPDIR)/Rules.make

        </pre></div></div><p><br class="example-break" />
	</p></li><li class="listitem"><p>
	Create the Kconfig entry
	</p><p>
	This procedure is as same as in the last section.
	</p></li><li class="listitem"><p>
	Run cvscompile script to re-generate the configure script and
	build the whole stuff again.
	</p></li></ol></div><p>
	</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch15s02.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch15.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch16.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Driver with A Single Source File&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;16.&#160;Useful Functions</td></tr></table></div></body></html>