Five-axis machining, an important processes in precision manufacturing, has been used in defense, aerospace and consumer product industries. Many combinations can be synthesized to generate various five-axis machine tool configurations, in which the linear and rotary axes are normally orthogonal. Since five-axis NC data can only be applied to a specific configuration, the portability of the NC data is inevitably limited. A special purpose five-axis machine with a nonorthogonal linear axis configuration is investigated in this research. The complete analytical equations for NC data are obtained using the homogeneous coordinate transformation matrix and inverse kinematics. A window-based postprocessor system written by Borland C++ Builder was developed according to the proposed algorithm. A roller gear cam was adopted as an example to generate the NC code using the proposed postprocessor system. A trail-cut experiment conducted with this special purpose machine tool confirms the effectiveness of the proposed methodology.