Light weight development processes like Agile have emerged in response to rapidly changing market requirements. However such processes are inadequate for software in embedded systems. As embedded software undergoes frequent refactoring, targeting only immediate requirements. As a result maintainability decreases because the system is not designed to respond to changes in the associated hardware. In this paper, we propose a method for detection of variation points and variability mechanisms. We also propose a technique for evaluation of flexibility to changes. Our approach is based on analyses of the call graph and the inheritance structure of source code to identify a layer structure that is specific to embedded software. These techniques provide us with objective and quantitative information about costs of adding functionality. We applied the proposal method to an actual product's code before and after the refactoring and could verify an improvement in system's variability.