public void populateDefineEquate(DataTypeManager openDTMgrs[], DataTypeManager dtMgr,
			String category, String prefix, String defName, long value) {
		String enumName = prefix + defName;

		// Start the Enum at 8, then resize to fit the value
		EnumDataType enuum = new EnumDataType(enumName, 8);
		enuum.add(defName, value);
		enuum.setLength(enuum.getMinimumPossibleLength());

		String defPath = getDefinitionPath(defName);
		String currentCategoryName = getFileName(defPath);
		CategoryPath path = getCategory(currentCategoryName);
		path = new CategoryPath(path, category);
		enuum.setCategoryPath(path);

		DataType dt = resolveDataType(openDTMgrs, path, enuum);

		dtMgr.addDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
	}
Given a data type manager, populate defines with constant values as Enums
Ghidra/Features/Base/src/main/java/ghidra/app/util/cparser/CPP/DefineTable.java