From one perspective...
From one perspective, the cases to which good and evil are attributed may be divided into two groups: one group is of those things whose goodness or evil is not causally dependent on anything else, such as the goodness of life and the evil of death, and the other group is of those things whose goodness or evil is causally dependent on other things, such as the goodness of those things on which the continuation of life depends, and the evil of that which causes death.
In reality, the goodness of actions is also of this second type, because their desirability is subordinate to the desirability of their ends and results. If their ends are also means for the realization of higher purposes, the relation to the final purposes will be judged according to the relation between the action and its results.
All innate inclinations and desires are subsidiary and respectival to the love of self; and since all conscious existents love themselves, their own survival, and their perfections, they have inclinations toward the things which effect their survival and perfection, in other words, toward the things which satisfy their physical and psychic needs.
In fact, these inclinations and desires are the means which the Creator has placed in the nature of every conscious existent to lead it toward the things it needs. Therefore, the most fundamental object of desire is the self, and then come the survival and perfection of the self. The desirability of other things is due to their effects on providing these basic desirable things.
Likewise, that which is fundamentally hateful is the destruction and imperfection of the existence of the self, and other things are hateful because of their effects on the fundamentally hateful things. In this manner, a clear way is obtained to generalize good and evil to perfection and imperfection, and then to existence and nothingness.
That is, by replacing these terms with the instances of desirable and undesirable things (perfection and imperfection of existence) in one side of the relation, and by omitting the characteristics of conscious entities and their inclinations from the other side of the relation, generalization to perfection and imperfection is achieved.