main: added helper macros useful for defining resources.
main: refactored machine resource definitions.
main: fixed compile breakage due to anonymous enum in resource struct.