Total derivative with a constraint

Hi there,

I have what I suspect is a straightforward question.

I wish to take the total derivative of the following function:

$W(q,x) = q \cdot u(x) + c(q,x)$

Subject to the constraint: $\frac{q}{x}$=$\bar{m}$, where $\bar{m}$ is some constant > 0, and c(q,x) is additively separable.

Without the constraint the total derivative is simply:

$dW(q,x) = u(x) dq + q \cdot u_{x} dx + c_{q}(q,x) dq + c_{x}(q,x) dx$

My question is: How do I incorporate the constraint?

Thanks for any help!

Brent.